Skip to main content

Module structural

Module structural 

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

FileMetadataFactory
Factory for the file.metadata planner.
GeoCoordinatePairFactory
Factory for the geo.coordinate_pair planner.
HierarchyTreeFactory
Factory for the hierarchy.tree planner.
RelationJunctionPairFactory
Factory for the relation.junction_pair planner.
RelationPolymorphicPairFactory
Factory for the relation.polymorphic_pair planner.
RelationTenantFamilyFactory
Factory for the relation.tenant_family planner.
TemporalLifecycleFactory
Factory for the temporal.lifecycle planner.
TemporalSoftDeleteFactory
Factory for the temporal.soft_delete planner.
TemporalTimestampsFactory
Factory for the temporal.timestamps planner.

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 between super::super::compiler and these planners.

Statics§

FILE_METADATA_DESCRIPTOR
Static description of the file.metadata planner.
GEO_COORDINATE_PAIR_DESCRIPTOR
Static description of the geo.coordinate_pair planner.
HIERARCHY_TREE_DESCRIPTOR
Static description of the hierarchy.tree planner.
RELATION_JUNCTION_PAIR_DESCRIPTOR
Static description of the relation.junction_pair planner.
RELATION_POLYMORPHIC_PAIR_DESCRIPTOR
Static description of the relation.polymorphic_pair planner.
RELATION_TENANT_FAMILY_DESCRIPTOR
Static description of the relation.tenant_family planner.
TEMPORAL_LIFECYCLE_DESCRIPTOR
Static description of the temporal.lifecycle planner.
TEMPORAL_SOFT_DELETE_DESCRIPTOR
Static description of the temporal.soft_delete planner.
TEMPORAL_TIMESTAMPS_DESCRIPTOR
Static description of the temporal.timestamps planner.