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.
Collects the predicates of one bracket. Everything added inside it combines by the bracket’s
own operator; nesting is unlimited. Mirrors the TS QueryGroupBuilder.
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.
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.
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.
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.