Skip to main content

Crate modelvault_core

Crate modelvault_core 

Source
Expand description

Embedded ModelVault database engine: append-only segments, versioned schema catalog, and last-write-wins row storage keyed by primary values.

§Stable API (0.16+)

Prefer Database, prelude, and root type re-exports. Modules marked #[doc(hidden)] are format/engine internals and may change in minor releases.

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::OpenOptionsBuilder;
pub use config::OpenRecoveryInfo;
pub use config::RecoveryMode;
pub use catalog::Catalog;
pub use catalog::CatalogRecord;
pub use catalog::CollectionInfo;
pub use db::Database;
pub use db::read_header_and_superblocks;
pub use db::scan_database_file;
pub use db::scan_database_store;
pub use db::select_superblock;
pub use db::DatabaseFileScan;
pub use db::DatabaseScanMode;
pub use db::SEGMENT_REGION_START;
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 Catalog state.
config
Open and recovery options for crate::db::Database.
db
Database handle and orchestration.
error
index
Persisted secondary index segments: payload codec and in-memory replay state.
migration
Migration planning and helpers.
prelude
Convenient re-exports for typical application code (Database, schema types, DbError).
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 Type values, and the DbModel marker trait.
schema_compat
sql
Minimal SQL adapter for DB-API (0.10.0+).
storage
validation
Validation at write time: types, nesting, and field constraints (0.6+).