Expand description
Builds IVM pipelines from ASTs (packages/zql/src/builder/builder.ts).
Two modes: compute, where every operator runs on the client’s own rows,
and the synced client’s, which reads aggregates and groups from the rows
the server streams for them (aggregates_from_source).
Structs§
- Optimistic
Aggregate OptimisticAggregate: how a mutation of a child row moves a synced aggregate’s row. Registered when a query with a relationship aggregate or a grouping materializes.
Constants§
- EXISTS_
LIMIT - The limit put on EXISTS subqueries: one row is enough, a few more keep a removal from emptying it.
- MAX_
PUSHED_ IN_ VALUES - The longest
INlist copied into a child. - PERMISSIONS_
EXISTS_ LIMIT
Traits§
- Builder
Delegate - Connects a pipeline being built to its environment (
BuilderDelegate).
Functions§
- aggregate_
table_ name aggregateTableName:aggregate:<queryID>:<alias path>, the table of an aggregate relationship’s rows.parent_nameis the parent’s pipeline name.- build_
pipeline - Builds a pipeline from an AST (
buildPipeline). - complete_
ordering completeOrdering: appends missing primary key columns to every ordering in the AST.- encode_
uri_ component - JS’s
encodeURIComponent: every UTF-8 byte but the letters, digits and-_.!~*'()as%XX; withescaping_dots,.too. - group_
table_ name groupTableName:aggregate:<queryID>:#group, the table of a grouped query’s rows. An escaped alias never has a#.- group_
view_ input groupViewInput: the input of a grouped query’s view: its rows reduced to the group columns and, for agroupBy()with an aggregate, the value under the function’s name, by the names of the pipeline’s AST.- push_
down_ correlated_ predicates - Copies a parent’s conditions on correlation columns into its subqueries. The result is the same; child rows that cannot join to a parent that matters are filtered out early.
- top_
level_ aggregate_ table_ name topLevelAggregateTableName:aggregate:<queryID>.