Skip to main content

Module query

Module query 

Source

Structs§

AccessPathSummary
AggregateResult
AggregateSpec
CorpusDelta
GroupedAggregateResult
One AggregateResult per distinct value of the group_by field, sorted by that value so output order is deterministic. Records missing the field, or holding a non-scalar value (object/array), fall into a single Value::Null group.
OrderBy
The single sort key of a query. Single, not a list, because the TS QueryBuilder.orderBy it mirrors keeps one key and overwrites it on every call.
PlanBranch
PlanOverlay
What a unit of work’s staged writes did to a query plan.
Predicate
PredicateGroupBuilder
Collects the predicates of one bracket. Everything added inside it combines by the bracket’s own operator; nesting is unlimited. Mirrors the TS QueryGroupBuilder.
QueryBuilder
Fluent, programmatic construction of a QuerySpec — the typed counterpart of the WHERE-clause text parsed by super::parser::parse_query. SELECT/FROM/JOIN/MATCH from ADR-0009 are a separate, larger piece and still not covered by either front.
QueryResult
QuerySpec
SearchSpec

Enums§

Combine
ComparisonOp
OverlayCandidates
Candidate keys an overlay’s own index can prove for one field/value pair.
OverlayStrategy
How the staged candidates of a PlanOverlay were picked.
PredicateNode
QueryStrategy
RecordSourceError
What a RecordSource can fail with. Its own type rather than io::Error so a failed decrypt keeps the whole HaysonCipherError — key id included — on the way out of the read path; TableError cannot be used here because it lives above query/ in the layering.
SearchMode
SortDirection

Traits§

QueryOverlay
The unit-of-work overlay a query is planned through — the txn/ side of the extension point RecordSource names. Kept as a trait here so query/ stays below txn/ in the layering.

Functions§

parse_query
Parses the WHERE-clause fragment of the SQL-like query language from ADR-0009 (cerebro ADR-6dk7) — a predicate expression combining comparisons with AND/OR and parentheses — followed by the optional ORDER BY <field> [ASC|DESC], LIMIT <n> and OFFSET <n>, in that order and at most once each. The fragment may be empty when at least one clause follows (ORDER BY name LIMIT 5); an empty text is still an error. SELECT/FROM/JOIN/MATCH and bound parameters are a separate, larger piece and are not covered here — see the query module’s TODO.