Skip to main content

Module plan

Module plan 

Source
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§

CompiledOutput
Resolved output/rendering configuration, carried over from the model’s output: block with the dialect parsed to a SqlDialect.
CompiledRelationship
A compiled relationship from a child table to a parent table, including the per-row parent assignment strategy executed by the engine.
DeferredConstraints
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.
FamilyPhase
A correlated family of tables generated together under a shared, exact memory budget.
GenerationPlan
A fully compiled generation plan: the immutable contract every downstream stage reads.
PlanEstimates
Cost and size estimates for a plan.
PlannedColumn
A schema column paired with the operator that owns its values and the compiled modifier pipeline applied after generation.
PlannedTable
A single selected table with its resolved row count and generation surface.

Enums§

ColumnOwner
What produces a column’s values.
ExecutionPhase
One unit of generation work, in execution order.
RelationshipDistribution
How a relationship distributes children across parent rows.
ResolvedTableSeed
A table’s seed, resolved against the run’s root seed and CLI overrides.