createFilterConstraintBuilder
createFilterConstraintBuilder<
TDoc>():FilterConstraintBuilder<TDoc>
Defined in: packages/core/src/access/createFilterConstraintBuilder.ts:33
Creates a fresh unindexed constraint builder: the q a rule receives when it
declares no withIndex (DD 13). Comparisons produce a compare node;
and/or/not wrap the nodes their arguments produced, so a whole
expression evaluates bottom-up into one tree.
Unlike createIndexConstraintBuilder this takes no sink and keeps no state. The indexed builder records a flat sequence, so someone has to own the list; here the combinators consume values and return values, which means the callback’s own return value already is the root of the tree. Two calls to this factory cannot interfere because there is nothing to interfere with — every node is freshly allocated and reachable only through what the caller was handed.
The framework reads the result by reinterpreting the returned
ConstraintResult as AccessFilterConstraint — the same erasure this
module performs internally on combinator arguments. ConstraintResult is nominal
precisely so a rule cannot hand back a hand-built object literal; only a real
chain call can produce one.
Type Parameters
Section titled “Type Parameters”TDoc
Document shape for the resource this rule governs.
Returns
Section titled “Returns”FilterConstraintBuilder<TDoc>
A stateless builder. Every call returns an independent object, and nothing is shared between them.