Skip to content

IndexedAccessCondition

Defined in: packages/core/src/access/constraintTypes.ts:287

An index-backed condition, which may still add a filter.

Returned by AccessQueryBuilder.withIndex. Already a complete condition on its own — return it directly for index-only narrowing — or continue with .filter(…) to add predicates the index range cannot express.

TDoc

Document shape for the resource this rule governs.

filter(predicate): AccessConditionResult

Defined in: packages/core/src/access/constraintTypes.ts:298

Adds a per-document predicate alongside the index range.

Compiles to .withIndex(name, range).filter(expr) — Convex’s own shape, and the reason both halves can coexist: the range narrows what is READ, the filter rejects rows within it that the range cannot describe (neq, or, not).

(q) => ConstraintResult

Builds the expression from the flat filter algebra.

AccessConditionResult

The completed condition.