# eq

> **eq**\<`N`, `V`\>(`name`, `value`): [`ComparisonNode`](https://stage.docs.arkiv.network/typescript-sdk/api-reference/query/interfaces/comparisonnode/)\<`ValueRef`\<`N`, `V`\>\>

Defined in: [src/query/expression.ts:285](https://github.com/Arkiv-Network/arkiv-sdk-js/blob/d464c8dce16c3b8c472479ac5aae9d14344eb067/src/query/expression.ts#L285)

Attribute equals value — set with this exact type, and holding this value.

Bare booleans, numbers, bigints and strings take the same default types they take when written
(`number` is an `i32`, `bigint` a `u256`, `string` a `str`); anything else names its type.

## Type Parameters

### N

`N` *extends* `string`

### V

`V` *extends* [`PredicateValue`](https://stage.docs.arkiv.network/typescript-sdk/api-reference/query/type-aliases/predicatevalue/)

## Parameters

### name

`N`

### value

`V`

## Returns

[`ComparisonNode`](https://stage.docs.arkiv.network/typescript-sdk/api-reference/query/interfaces/comparisonnode/)\<`ValueRef`\<`N`, `V`\>\>

## Throws

If the name is outside the attribute name grammar.

## Throws

If the name starts with `$` but is not a queryable system
attribute, a system attribute is compared against the wrong type, or the value is `bytes`.

## Example

```ts
eq("status", str("open"))     // status = str('open')
eq("flagged", true)           // flagged = true
eq("$owner", addr(account))   // $owner = addr(0xd8dA…)
```