eq
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.
Type Parameters
Section titled “Type Parameters”N extends string
V extends PredicateValue
Parameters
Section titled “Parameters”N
V
Returns
Section titled “Returns”ComparisonNode<ValueRef<N, V>>
Throws
Section titled “Throws”If the name is outside the attribute name grammar.
Throws
Section titled “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
Section titled “Example”eq("status", str("open")) // status = str('open')eq("flagged", true) // flagged = trueeq("$owner", addr(account)) // $owner = addr(0xd8dA…)