Skip to content

between<N, L, H>(name, low, high): BetweenNode<ValueRef<N, L>>

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

Attribute lies between two values, inclusive at both ends: it matches exactly what and(gte(name, low), lte(name, high)) matches, in one predicate. Both bounds must have one type, and a low above high matches nothing.

N extends string

L extends PredicateValue

H extends PredicateValue

N

L

H & SameTypeCheck<L, H>

BetweenNode<ValueRef<N, L>>

If the name is outside the attribute name grammar.

If the bounds have different types, the name starts with $ but is not a queryable system attribute, a system attribute is compared against the wrong type, or a bound is bytes.

between("score", dec("3.5"), dec("5")) // score BETWEEN dec(3.5) AND dec(5)
between("$expiresAt", u64(100n), u64(200n))