Skip to content

QueryIndexConstraint

QueryIndexConstraint<TField, TDoc> = object

Defined in: packages/core/src/access/queryConstraintTypes.ts:176

One recorded positional constraint: field is pinned to a literal, op is one of IndexOp, and value is typed from the document shape at that field. This is what a ConstraintBuilder chain call records (createQueryIndexConstraintBuilder, access/createQueryIndexConstraintBuilder.ts), and what a later compiler step reads back to build a withIndex range, a FilterBuilder expression, or a JS predicate — the same recorded data feeds all three, which is the reason a builder replaces a callback.

TField extends string

The field name this constraint pins.

TDoc

The document shape value’s type is read from.

field: TField

Defined in: packages/core/src/access/queryConstraintTypes.ts:177


op: IndexOp

Defined in: packages/core/src/access/queryConstraintTypes.ts:178


value: ConstraintValue<TDoc, TField>

Defined in: packages/core/src/access/queryConstraintTypes.ts:179