Skip to main content

Module query

Module query 

Source

Structs§

AggCall
One aggregate in an Aggregate. field is None only for Count, and arg is the fraction for Percentile (e.g. 0.95). alias names the output field in each result row.
Aggregate
A grouped aggregation carrying one or more AggCalls, so a single query can return several aggregates grouped by the same keys. An optional window adds a time-bucket key.
ConsistencyGate
The server-side gate that enforces a Consistency level the same way on every backend. The client refuses an unadvertised level before sending, but a backend that does advertise read_your_writes or strong_consistency still has to honor the level, and the rule is fail-not-downgrade: serve only when the projector’s applied offset for the queried source has reached the required offset (the source log head at query time), else return QueryError::Stale rather than a silently older read.
KeyMatch
One exact-match constraint: the indexed field must equal value.
MaterializationBoundary
Page
Pagination info for a query result.
Predicate
A filter leaf: a field, a comparison op, and a value.
Query
A query against a materialized index. Build it fluently via the SDK’s Laser::query, or directly through Query::builder.
QueryBuilder
Use builder syntax to set the inputs and finish with build().
QueryCancelEnvelope
QueryContext
Target and execution evidence returned with every page.
QueryEngine
QueryEnvelope
Internal on-wire envelope: a versioned wrapper around Query. Workers and clients use it, app code does not.
QueryExecutionId
Unguessable identity used for query status, paging, and cancellation.
QueryExecutionStatus
QueryFrontier
One source partition’s applied position in the store that served a query.
QueryPageEnvelope
QueryPageRequest
QueryResult
A typed page. Each row is positionally aligned with fields.
QueryStatusEnvelope
RawSql
Raw-SQL escape hatch scoped to Query::target. The server validates both the parsed statement and the resulting scan plan against that target.
Row
One typed query row. Values are ordered exactly like QueryResult::fields.
Select
Which columns and payload a query returns.
Sort
An order-by clause: a field and a direction.
TextQuery
A lexical relevance search: the text to match and, optionally, the one indexed field to match it in (None searches every text-hinted field). Relevance is returned as an ordinary typed result field. Capability-gated by KEYWORD_SEARCH: a backend without a lexical index answers unsupported, never a contains approximation.
VectorQuery
A nearest-neighbour search: the query embedding and how many rows to return.
Window
A tumbling window of every_micros over the timestamp field.

Enums§

AggFunc
An aggregate function. Percentile and StdDev are backend-gated (the embedded engine does not provide them, a columnar backend does).
BoundaryRelation
CmpOp
A comparison operator for a Predicate.
Consistency
How fresh a query’s view of the materialized index must be. A materialized view is a read model a projector builds by tailing the log, so it is eventually consistent: a record is queryable once the projector has applied it, not the instant it is appended. This level says what the query requires of that lag, and the contract is fail-not-downgrade: a level that cannot be met returns QueryError::Stale rather than silently serving older data.
Dir
Sort direction (ascending or descending).
Filter
A predicate tree. All/Any are n-ary, Not negates, Pred is a single comparison leaf. Externally tagged on the wire: {"all":[{"pred":{...}}]}.
QueryCancelReply
QueryError
Why a query failed.
QueryErrorCode
Stable machine-readable classification for QueryError.
QueryExecutionState
QueryReply
A query reply: Ok(QueryResult) or Err(QueryError).
QueryStatusReply
QueryTarget
The resource against which a query is authorized and resolved.
ResolvedQueryTarget
SnapshotSelector
An optional time-travel selector resolved to one exact Iceberg snapshot.
SqlDialect
SQL grammar accepted by the selected query backend.
Value
A scalar value used by the graph and older non-query document surfaces. Query predicates and results use the tagged TypedValue contract. This remains untagged because it is part of the separate graph wire surface.