Skip to main content

icydb_core/model/
mod.rs

1//! Module: model
2//!
3//! Responsibility: module-local ownership and contracts for model.
4//! Does not own: cross-module orchestration outside this module.
5//! Boundary: exposes this module API while keeping implementation details internal.
6
7//! Runtime data model definitions.
8//!
9//! This module contains the *runtime representations* of schema-level concepts,
10//! as opposed to their declarative or macro-time forms. Types in `model` are
11//! instantiated and used directly by query planning, executors, and storage
12//! layers.
13//!
14//! Currently this includes index-related models, but the module is intended to
15//! grow to encompass additional runtime schema nodes (e.g. entities, fields,
16//! or constraints) as IcyDB’s internal model is made more explicit.
17//!
18//! In general:
19//! - Schema / macro code defines *what exists*
20//! - `model` defines *what runs*
21//!
22//! Model types are **internal** runtime artifacts derived from typed entities.
23//! Downstream code should not construct them manually except in tests that
24//! intentionally exercise invalid or edge-case schemas.
25
26pub(crate) mod entity;
27pub(crate) mod field;
28pub(crate) mod index;
29
30// re-exports
31pub use entity::EntityModel;
32pub use field::{EnumVariantModel, FieldKind, FieldModel, FieldStorageDecode, RelationStrength};
33pub use index::{IndexExpression, IndexKeyItem, IndexKeyItemsRef, IndexModel};