pub fn resolve_integer_range_bucket_clause(
field: &str,
start: &Value,
grid: Option<IntegerRangeGridSpec>,
document_type: DocumentTypeRef<'_>,
) -> Result<(WhereClause, ResolvedTimeRange), Error>Expand description
Resolves an IN_INTEGER_RANGE selection on field — the window of an
integerRange grid starting at start — into a concrete equality
WhereClause on the bucketed source field, plus the
ResolvedTimeRange provenance callers must record on the query (see
DriveDocumentQuery::resolved_time_ranges).
The integer counterpart of resolve_time_range_bucket_clause’s
byStart: the window is named absolutely, so the server and the proof
verifier resolve it from the query alone, with no clock. start must be
an integer that names a window of the grid (a grid start the property’s
type can hold, or the type’s minimum for the clamped bottom window — see
[IntegerRangeTransform::is_window_start]); anything else is rejected
rather than snapped. An empty window is a provable empty answer.
grid selects among several integer-range indexes on the same field:
None is accepted only while exactly one grid buckets the field.
The equality’s value is the start as an integer; the query path serializes it through the schema exactly like a raw value of the field, which is how the walkers stored it.