Skip to content

AccessCondition

Defined in: packages/core/src/access/createAccessQueryBuilder.ts:26

What a rule’s constraints callback resolved to: the condition on which documents the caller may read.

Either half may be present, and both together is the normal case, not a conflict — it is exactly .withIndex(name, range).filter(expr), Convex’s own shape. The range narrows what is READ; the filter rejects rows within that range which the range cannot describe (neq, or, not).

Neither present means the callback returned a condition that excludes nothing. Absence of a condition altogether is undefined, not an empty object.

TDoc

Document shape the values are typed against.

optional filter?: AccessFilterConstraint<TDoc>

Defined in: packages/core/src/access/createAccessQueryBuilder.ts:35

Root of the predicate tree, when the rule added or used filter.


optional index?: object

Defined in: packages/core/src/access/createAccessQueryBuilder.ts:28

The index the rule chose, and the range it built on it.

constraints: readonly AccessIndexConstraint<string, TDoc>[]

The range, in call order. Never empty — the range callback is required.

name: string

Declared index name passed to q.withIndex(…).