Expand description
Embedded ModelVault database engine: append-only segments, versioned schema catalog, and last-write-wins row storage keyed by primary values.
Start with Database for open, register, insert, and get. Supporting types include
Catalog, ScalarValue, FieldDef, and DbError. For a small import set, use
prelude.
Re-exports§
pub use config::OpenMode;pub use config::OpenOptions;pub use config::RecoveryMode;pub use catalog::Catalog;pub use catalog::CatalogRecord;pub use catalog::CollectionInfo;pub use db::Database;pub use error::DbError;pub use error::DbErrorKind;pub use error::FormatError;pub use error::SchemaError;pub use error::TransactionError;pub use error::ValidationError;pub use migration::MigrationPlan;pub use migration::MigrationStep;pub use record::RowValue;pub use record::ScalarValue;pub use schema::CollectionId;pub use schema::CollectionSchema;pub use schema::Constraint;pub use schema::DbModel;pub use schema::FieldDef;pub use schema::IndexDef;pub use schema::IndexKind;pub use schema::SchemaVersion;pub use schema::Type;pub use schema_compat::classify_schema_update;pub use schema_compat::validate_model_fields_against_catalog;
Modules§
- catalog
- Persisted schema catalog: binary codec payloads and
Catalogstate. - checkpoint
- Checkpoint payloads: persisted logical state snapshots to accelerate open/replay.
- checksum
- CRC32C helpers used by headers, superblocks, and segment payloads.
- config
- Open and recovery options for
crate::db::Database. - db
- Database handle and orchestration.
- error
- file_
format - Fixed-size file header (
TDB0) and format major/minor constants. - index
- Persisted secondary index segments: payload codec and in-memory replay state.
- manifest
- Manifest v0: points at the last appended segment (tail of the log).
- migration
- Migration planning and helpers.
- pager
- prelude
- Convenient re-exports for typical application code (
Database, schema types,DbError). - publish
- Append a manifest segment and rotate superblocks so readers see consistent tail metadata.
- query
- Minimal typed query AST, planning, and execution (0.7.0).
- record
- Record payloads (v1/v2) and row/scalar codecs.
- schema
- Collection identity, field paths, logical
Typevalues, and theDbModelmarker trait. - schema_
compat - segments
- Segment headers, scanning, and read/write helpers for the append-only log.
- spill
- Spill manager for bounded-memory query operators (0.12.0+; stabilized in 0.13.0).
- sql
- Minimal SQL adapter for DB-API (0.10.0+).
- storage
- superblock
- Dual redundant superblocks (
TSB0) storing generation and manifest pointer. - txn
- Transaction control segment payloads (
TxnBegin/TxnCommit/TxnAbort). - validation
- Validation at write time: types, nesting, and field constraints (0.6+).