Expand description
The untyped query builder (QueryImpl in
packages/zql/src/query/query-impl.ts) and the builder of where
conditions (ExpressionBuilder in packages/zql/src/query/expression.ts).
The AST is always normalized: each step builds its part of the AST in
normalized form. Misuse that JS reports by throwing from the builder,
such as a negative limit or a limit inside a junction relationship,
leaves that step out and makes the query invalid: AnyQuery::invalid
holds JS’s message. An unknown relationship is a programming error and
panics.
Structs§
- AnyGrouped
Query - A query grouped by columns, waiting for the aggregate that reduces each
group (
GroupedQuery). - AnyQuery
- A query over a table, named by strings.
- Custom
Query Id - The name and arguments of the named query a query was built by.
- Exists
Options - The options of
existsandwhereExists. - Expression
Builder - Builds the conditions of a
where(ExpressionBuilderinpackages/zql/src/query/expression.ts). - Json
Path Reference - A value inside a
jsoncolumn, made byExpressionBuilder::json(ColumnRefinpackages/zql/src/query/expression.ts). - Static
Parameter - A value taken from the context a query runs in, such as the auth data
(
staticParaminpackages/zql/src/query/static-param.ts).
Constants§
- FALSE_
CONDITION FALSE: an empty OR.- SUBQUERY_
ALIAS_ PREFIX - The prefix of the aliases the builder gives
existssubqueries (SUBQ_PREFIXinpackages/zero-protocol/src/ast.ts). - TRUE_
CONDITION TRUE: an empty AND.
Traits§
- Zero
Query - A query a
Zeromaterializes, runs, and preloads: anAnyQuery, a typedQuery, or (with theserdefeature) aQueryRequestof adefine_querydefinition, which is built with the client’s context.
Functions§
- simplify_
condition simplifyCondition(packages/zql/src/query/expression.ts).