pub struct FamilyTemplate {
pub stripped: Ast,
pub params: Vec<Box<str>>,
pub positions: Vec<usize>,
}Expand description
A parameterized query family’s identity and template (design 310 §3), re-exported from
rindle-wire so a daemon groups subscriptions with the same types the engine binds on.
The compiled half of a family: the stripped AST the builder lowers, plus the names
of the holed columns (the partition key, resolved to ColIds by the builder) and
each hole’s position among the original top-level conjuncts (what
instantiate needs to be an exact inverse).
Fields§
§stripped: AstThe number-canonicalized AST with the holed conjuncts removed.
params: Vec<Box<str>>The holed conjuncts’ column names, in hole order.
positions: Vec<usize>Each hole’s index among the concrete query’s top-level conjuncts (0 for a
query whose whole where was the one holed conjunct).
Implementations§
Source§impl FamilyTemplate
impl FamilyTemplate
Sourcepub fn instantiate(&self, binding: &Vec<CanonVal>) -> Ast
pub fn instantiate(&self, binding: &Vec<CanonVal>) -> Ast
The concrete AST for one binding — the exact inverse of extraction on the
number-canonicalized AST (instantiate(extract(a).template, extract(a).binding) == canonicalized(a)). Used by the engine’s differential (the standalone twin
of a partition), by the daemon’s per-partition normalize fold, and by
migration.
Trait Implementations§
Source§impl Clone for FamilyTemplate
impl Clone for FamilyTemplate
Source§fn clone(&self) -> FamilyTemplate
fn clone(&self) -> FamilyTemplate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more