Rindle docs and package mapSkip to main content

Module family

Module family 

Source
Expand description

Parameterized query families (design 310 §4): BindingSet — the binding-set handle a family root connection’s membership predicate reads — and FamilyPipeline, what build_family_pipeline returns and what Graph::bind_family_partition / unbind_family_partition / hydrate_family drive. See src/family.rs. Parameterized query families — the engine half of design 310 (designs/310-PARAMETERIZED-QUERY-FAMILIES-DESIGN.md §4).

V subscriptions that are the same query but for a root-level equality literal (albums.where(artistId = ?a).related(tracks) for V values of ?a) compile to one pipeline whose parameter columns are a partition dimension instead of a predicate. The pipeline maintains results for every currently-bound parameter tuple at once; the root connection’s holed conjuncts are replaced by one membership test — row’s partition-key tuple ∈ BindingSet — and the root limit becomes a per-binding top-N (a Take partitioned by the parameter columns). Everything below the root is naturally partition-safe: root partitions are disjoint (a root row has exactly one partition-key tuple), so no operator other than the root limiter learns about partitions.

Entry points: build_family_pipeline lowers a template (the stripped AST + parameter names — rindle-wire’s FamilyTemplate, split into its two fields because rindle-wire depends on this crate and not the reverse) into a FamilyPipeline; Graph::bind_family_partition / Graph::unbind_family_partition / Graph::hydrate_family drive it.

Binding mutations happen only between pushes (impl plan D3). The BindingSet is interior-mutable so the root connection’s predicate can read it through a shared Rc, but nothing mutates it while a push or a fetch is in flight: bind/unbind are host commands, never operator side effects. That is what makes the reentrant fetch-during-push compose with the membership predicate exactly as it does with any other predicate — the RefCell borrow inside BindingSet::contains_row is a momentary shared borrow that no writer ever contends with.

Structs§

BindingSet
The currently-bound partition-key tuples of one family pipeline (design §4.1’s “binding-set handle”). Shared (Rc) between the root connection’s predicate and the graph’s bind/unbind path; interior-mutable, but mutated ONLY between pushes (impl plan D3) — the predicate takes a momentary shared borrow per row.
FamilyPipeline
A built family pipeline: what build_family_pipeline returns and what the graph’s bind/unbind/hydrate entry points take. The node ids are the pipeline’s own (the caller records them in a PipelineManifest exactly as for a singleton).