Skip to main content

Module state

Module state 

Source
Expand description

Owned, serializable snapshots of model metadata.

ModelState::from_meta copies a &'static ModelMeta. ProjectState::from_metas also synthesizes join-table models for auto many-to-many relations (ManyToManyMeta::through == None). Unmanaged models (managed: false) are skipped.

SqlType, OnDelete and DbDefault here are serde mirrors of the ORM types, which do not implement serde.

Structs§

FieldState
One concrete column.
ForeignKeyState
Foreign-key target stored on a field snapshot.
IndexState
A named multi-column index.
ModelState
Snapshot of one model (or a synthesized M2M join table).
ProjectState
The whole project’s managed schema.

Enums§

ConstraintState
A table-level constraint.
DbDefault
Server-side column default (serde mirror of siderite_orm::DbDefault).
OnDelete
Deletion policy (serde mirror of siderite_orm::OnDelete).
SqlType
Portable column type family (serde mirror of siderite_orm::SqlType).

Functions§

auto_index_name
Deterministic name for the single-column index implied by field.index.