Expand description
Common same-table temporal planners plus the relationship/hierarchy planners that build on the same execution pattern.
Temporal planners include temporal.timestamps (a created/updated pair, plus
optional trailing timestamps), temporal.soft_delete (a coherent
deleted_at/is_deleted pair), and temporal.lifecycle (a status column
that only ever reaches legal states, each carrying a correctly-ordered
timestamp).
Relationship and hierarchy planners include hierarchy.tree (a self-referential
parent_id tree with configurable-ratio roots and bounded depth/branching)
and the cross-table FK-side planners relation.junction_pair (unique
(left, right) edges via a deterministic pair-index permutation),
relation.polymorphic_pair (an atomic (type, id) pair choosing a target
table then a valid key in it), and relation.tenant_family (a same-tenant
foreign key drawn from the child’s own tenant partition of the parent). The
cross-table planners cannot see the tables they reference, so the compiler
injects the referenced parent counts and dense key recipes as facts under
RELATION_FACTS_KEY, driven off the descriptor’s cross_table capability.
§Shared machinery, separate planners
Each planner is registered under its own kind with its own factory and
compiled type — no option-heavy mega-planner. What they share is how a
timestamp is chosen: [InstantDraw] picks a base instant (a bounded
random draw or a monotonically increasing one), and [OffsetDraw] picks a
non-negative whole-unit offset added to a base instant. Every timestamp is
reduced to a single internal UTC instant measured in nanoseconds since the
Unix epoch (an i128), so every “B happens no earlier than A” invariant is
pure checked integer arithmetic, matching the temporal.interval approach.
§Owned columns and streams
Each planner owns exactly the columns named under its columns: mapping;
the model compiler turns those into ownership claims, so a colliding
generator raises GEN-COLUMN-OWNER-CONFLICT. Every row draws its
constituent choices from independent, stably-keyed seed streams in a fixed
order — regardless of which branch a row lands in — so a seeded run
reproduces exactly.
Structs§
- File
Metadata Factory - Factory for the
file.metadataplanner. - GeoCoordinate
Pair Factory - Factory for the
geo.coordinate_pairplanner. - Hierarchy
Tree Factory - Factory for the
hierarchy.treeplanner. - Relation
Junction Pair Factory - Factory for the
relation.junction_pairplanner. - Relation
Polymorphic Pair Factory - Factory for the
relation.polymorphic_pairplanner. - Relation
Tenant Family Factory - Factory for the
relation.tenant_familyplanner. - Temporal
Lifecycle Factory - Factory for the
temporal.lifecycleplanner. - Temporal
Soft Delete Factory - Factory for the
temporal.soft_deleteplanner. - Temporal
Timestamps Factory - Factory for the
temporal.timestampsplanner.
Constants§
- RELATION_
FACTS_ KEY - The private config key under which the compiler injects the resolved
parent-key facts an FK-side cross-table planner (
relation.junction_pair,relation.tenant_family,relation.polymorphic_pair) needs to produce valid keys for tables it references but cannot see on its own. Documented as an internal contract betweensuper::super::compilerand these planners.
Statics§
- FILE_
METADATA_ DESCRIPTOR - Static description of the
file.metadataplanner. - GEO_
COORDINATE_ PAIR_ DESCRIPTOR - Static description of the
geo.coordinate_pairplanner. - HIERARCHY_
TREE_ DESCRIPTOR - Static description of the
hierarchy.treeplanner. - RELATION_
JUNCTION_ PAIR_ DESCRIPTOR - Static description of the
relation.junction_pairplanner. - RELATION_
POLYMORPHIC_ PAIR_ DESCRIPTOR - Static description of the
relation.polymorphic_pairplanner. - RELATION_
TENANT_ FAMILY_ DESCRIPTOR - Static description of the
relation.tenant_familyplanner. - TEMPORAL_
LIFECYCLE_ DESCRIPTOR - Static description of the
temporal.lifecycleplanner. - TEMPORAL_
SOFT_ DELETE_ DESCRIPTOR - Static description of the
temporal.soft_deleteplanner. - TEMPORAL_
TIMESTAMPS_ DESCRIPTOR - Static description of the
temporal.timestampsplanner.