Skip to main content

sql_splitter/synthetic/
mod.rs

1//! Portable schema representation for synthetic data generation.
2//!
3//! [`crate::schema::Schema`] is a *runtime* model shaped around DDL parsing:
4//! it carries dialect quirks, resolved foreign key IDs, and mutable state
5//! that only matters while a dump is being read. Generation stages need
6//! something calmer — a dialect-agnostic, serializable snapshot of "what a
7//! table looks like" that can be written to disk, diffed, or hand-edited
8//! between a schema-inspection pass and a generation pass.
9//!
10//! [`schema::PortableSchema`] is that snapshot. Build one from a parsed
11//! [`crate::schema::Schema`] with [`schema::PortableSchema::from_runtime`].
12
13pub mod config;
14pub mod merge;
15pub mod model;
16pub mod overrides;
17pub mod schema;
18
19pub use config::{merge_yaml, ConfigLoader};
20pub use merge::ModelMerger;
21pub use model::{
22    ChildDistribution, ColumnRule, FingerprintPolicy, GeneratorConfig, InferenceMode, InsertMode,
23    ModelDefaults, ModelKind, ModifierConfig, OutputMode, OutputModel, PlannerConfig,
24    ProfileInference, ProfileMetadata, RelationshipModel, RelationshipReference, RowsModel,
25    SourceModel, SourceValueUse, SyntheticFile, SyntheticModel, TableModel, TableSeed,
26    MAX_OUTPUT_BATCH_SIZE,
27};
28pub use overrides::{
29    ColumnRuleOverride, OutputOverride, OverridesKind, PortableTableOverride, RootSeedOverride,
30    RowsKind, RowsOverride, SyntheticOverrides, TableOverride, TableSeedOverride,
31};
32pub use schema::{PortableColumn, PortableSchema, PortableTable, SqlTypeFamily};