AccessIndexSelection
AccessIndexSelection<
TDoc,TIndexFields> ={ [N in keyof TIndexFields & string]: { name: N; range: (ix: ConstraintBuilder<TIndexFields[N], TDoc, 0>) => ConstraintResult } }[keyofTIndexFields&string]
Defined in: packages/core/src/access/queryConstraintTypes.ts:288
The index half of an access rule: which declared index to read through and the
range over its fields, as a discriminated object — the same shape as find’s
withIndex argument, with range required.
Discriminating on the literal name is what types ix against THAT index’s
field tuple, in declaration order, so Convex’s field-order rule is a compile
error at the rule.
Type Parameters
Section titled “Type Parameters”TDoc
Document shape range values are typed from.
TIndexFields
Section titled “TIndexFields”TIndexFields extends Record<string, readonly string[]>
The resource’s index name → field tuple map.