sim_kernel/catalog.rs
1//! The registry catalog substrate: transactional, `Cx`-free table storage.
2//!
3//! The catalog is the authoritative storage behind the
4//! [`Registry`](crate::Registry); see the README section "Contract: registry
5//! catalog substrate". The kernel defines the catalog contracts -- schema, rows,
6//! transactions, the append-only journal, snapshots, deltas, overlays,
7//! read-only views, and replay -- and ships a default [`store::CatalogStore`];
8//! libraries supply higher-level behavior over them.
9
10/// Snapshot-to-snapshot change sets and their application.
11pub mod delta;
12/// Append-only audit journal of committed catalog operations.
13pub mod journal;
14/// Composite `table/key` string keys used by catalog views and overlays.
15pub mod key;
16/// Buffered, uncommitted catalog edits layered over a base store.
17pub mod overlay;
18/// Deterministic replay of journaled catalog events.
19pub mod replay;
20/// Catalog row data: deterministic [`Expr`](crate::Expr) plus live payloads.
21pub mod row;
22/// Table specifications and write policies.
23pub mod schema;
24/// Deterministic point-in-time snapshots of catalog data.
25pub mod snapshot;
26mod snapshot_expr;
27/// The [`store::CatalogStore`]: lock-free transactional table storage.
28pub mod store;
29/// Mutable catalog-backed table object for ordinary runtime use.
30pub mod table_backend;
31/// Atomic catalog transactions and their constituent operations.
32pub mod tx;
33/// Read-only catalog directory and table views.
34pub mod view;
35
36pub use delta::{CatalogDeletedRow, CatalogDelta, CatalogSequenceChange};
37pub use journal::{CatalogEvent, CatalogEventOp};
38pub use key::{catalog_key, split_catalog_key};
39pub use overlay::CatalogOverlay;
40pub use replay::{CatalogReplay, CatalogReplayEvent};
41pub use row::CatalogRow;
42pub use schema::{CatalogTableSpec, CatalogWritePolicy};
43pub use snapshot::{CatalogSnapshot, CatalogSnapshotRow};
44pub use store::CatalogStore;
45pub use table_backend::{CatalogBackend, CatalogTable};
46pub use tx::{CatalogOp, CatalogTx};
47pub use view::{CatalogDirView, CatalogTableView, registry_catalog_view};
48
49#[cfg(test)]
50mod delta_tests;
51#[cfg(test)]
52mod overlay_tests;
53#[cfg(test)]
54mod snapshot_tests;
55#[cfg(test)]
56mod tests;
57#[cfg(test)]
58mod view_tests;