Expand description
The immutable GenerationPlan: the compiler’s output.
A plan is what super::compiler::ModelCompiler produces from a complete
crate::synthetic::model::SyntheticModel and a set of CLI
[CompileOptions]. It fixes, once and for all, which tables are
generated, in what order, and with exactly how many rows — every later
stage reads a plan rather than re-deriving those decisions.
Plan fields are public but treated as read-only after construction: the
compiler builds a plan and hands it out; nothing mutates it in place. Most
types here derive Debug/Clone; PlannedTable cannot, because it owns
Box<dyn CompiledPlanner> trait objects, so it carries a hand-written
std::fmt::Debug that keeps the plan observable without pretending the
compiled planners are printable.
The plan also fixes column ownership, relationship assignment strategies, execution phases for individual tables and correlated families, and cost estimates used by reporting and execution.
Structs§
- Compiled
Output - Resolved output/rendering configuration, carried over from the model’s
output:block with the dialect parsed to aSqlDialect. - Compiled
Relationship - A compiled relationship from a child table to a parent table, including the per-row parent assignment strategy executed by the engine.
- Deferred
Constraints - Constraints deferred until after the rows they reference are generated — self-referential or circular foreign keys the ordinary parent-before-child ordering cannot satisfy in one pass.
- Family
Phase - A correlated family of tables generated together under a shared, exact memory budget.
- Generation
Plan - A fully compiled generation plan: the immutable contract every downstream stage reads.
- Plan
Estimates - Cost and size estimates for a plan.
- Planned
Column - A schema column paired with the operator that owns its values and the compiled modifier pipeline applied after generation.
- Planned
Table - A single selected table with its resolved row count and generation surface.
Enums§
- Column
Owner - What produces a column’s values.
- Execution
Phase - One unit of generation work, in execution order.
- Relationship
Distribution - How a relationship distributes children across parent rows.
- Resolved
Table Seed - A table’s seed, resolved against the run’s root seed and CLI overrides.