Skip to content

eq<N, V>(name, value): ComparisonNode<ValueRef<N, V>>

Defined in: src/query/expression.ts:285

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.

N extends string

V extends PredicateValue

N

V

ComparisonNode<ValueRef<N, V>>

If the name is outside the attribute name grammar.

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.

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