Skip to main content

icydb_core/model/
mod.rs

1//! Module: model
2//!
3//! Responsibility: runtime schema-model types consumed by planning and execution.
4//! Does not own: declarative schema ASTs or macro-time code generation surfaces.
5//! Boundary: internal runtime model layer derived from typed entities and indexes.
6//!
7//! This module contains the runtime representations of schema-level concepts,
8//! as opposed to their declarative or macro-time forms. Types in `model` are
9//! instantiated and used directly by query planning, executors, and storage
10//! layers.
11
12pub(crate) mod entity;
13pub(crate) mod field;
14pub(crate) mod field_kind_semantics;
15pub(crate) mod index;
16
17// re-exports
18pub use entity::{
19    EntityModel, PrimaryKeyModel, PrimaryKeyModelFieldIter, PrimaryKeyModelFields,
20    RelationEdgeModel,
21};
22pub use field::{
23    DEFAULT_BIG_INT_MAX_BYTES, EnumVariantModel, FieldDatabaseDefault, FieldInsertGeneration,
24    FieldKind, FieldModel, FieldStorageDecode, FieldWriteManagement, RelationStrength,
25};
26pub(crate) use field_kind_semantics::{
27    canonicalize_filter_literal_for_kind,
28    canonicalize_grouped_having_numeric_literal_for_field_kind,
29    canonicalize_strict_sql_literal_for_kind, classify_field_kind,
30    field_kind_has_identity_group_canonical_form,
31};
32pub use index::{
33    GeneratedIndexPredicateResolver, IndexExpression, IndexKeyItem, IndexKeyItemsRef, IndexModel,
34    IndexPredicateMetadata,
35};