Skip to main content

Crate gaman_core

Crate gaman_core 

Source
Expand description

Core schema modeling, lexical diffing, semantic drift, migration planning, replay, clarification, and SQL rendering primitives.

Gaman works with three schema sources: authored input, replayed migration state, and live inspected state. Authored input is normalized and lexically diffed against replayed state to generate migrations. Live inspected state is normalized through the selected dialect and semantically drift-diffed against replayed state using dialect comparator callbacks.

input Schema -> normalize + prepare(dialect)
                        |
replayed Schema --------+-> DiffEngine -> raw operations -> Clarifier -> Migration

inspected Schema -> normalize_inspected_schema(dialect)
                        |
replayed Schema --------+-> drift::diff -> VerificationReport

VerificationReport -> repair::plan_repair -> repair operations -> SQL

Migration replay -> prepare(dialect) -> SqlPlanRenderer + Dialect -> SQL

parsers loads SQL DDL into Schema; offline_planner owns offline generation; drift owns semantic live drift reports; repair owns database-I/O-free drift repair planning; sql_plan renders forward, rollback, and repair SQL from migrations.

Re-exports§

pub use dialects::Dialect;
pub use dialects::DialectError;
pub use migrations::Migration;

Modules§

clarifier
column_type
dialects
diff
drift
Registry-driven drift verification for inspectable database properties.
graphs
migrations
operations
parsers
Dialect-aware SQL parsers that lower DDL into Gaman schema state.
repair
Drift repair planning without database I/O.
replay
Shared migration replay, source tracking, dependency, and naming helpers.
schema
states

Structs§

EmbeddedMigrations
OfflinePlanner

Enums§

OfflineError