Skip to content

Expression<R> = ComparisonNode<R> | BetweenNode<R> | StartsWithNode<R> | ExistsNode<R> | TypeOfNode<R> | AndNode<R> | OrNode<R>

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

A query expression: an immutable tree built by the combinators below, whose toString() is the exact query string sent over the wire.

R extends AttributeRef = AttributeRef

The attributes the expression names, as AttributeRefs — inferred by the combinators, and checked against the schema by select(...).from(schema).where(...).

const q = and(gte("level", i32(10)), or(eq("status", str("open")), exists("reviewedBy")))
String(q) // level >= i32(10) AND (status = str('open') OR EXISTS(reviewedBy))