Skip to main content

mongreldb_core/
lib.rs

1//! MongrelDB core — a log-structured columnar store with sub-ms writes, learned
2//! indexes over a shared row-id space, page-level native encryption, an
3//! MVCC-tagged content-addressed cache, and an AI-native access layer.
4//!
5//! The crate owns the WAL + memtable + Bε-tree write path, sorted-run container
6//! formats, MVCC snapshots, page cache, encryption, compaction, and indexes.
7
8#![allow(clippy::module_inception)]
9
10pub mod be_tree;
11pub mod cache;
12pub mod catalog;
13pub mod columnar;
14pub mod compaction;
15pub mod constraint;
16pub mod cursor;
17pub mod database;
18pub mod encryption;
19pub mod engine;
20pub mod epoch;
21pub mod error;
22pub mod gc;
23pub mod global_idx;
24pub mod index;
25pub mod manifest;
26pub mod memtable;
27pub mod mutable_run;
28pub mod page;
29pub mod pma;
30pub mod query;
31pub mod reservoir;
32pub mod retention;
33pub(crate) mod row_id_set;
34pub mod rowid;
35pub mod schema;
36pub mod sorted_run;
37pub mod trace;
38pub mod tsv;
39pub mod txn;
40pub mod wal;
41
42pub use be_tree::BeTree;
43pub use cache::PageCache;
44pub use columnar::{decode_column, encode_column};
45pub use cursor::{drain_cursor_to_columns, Cursor, MultiRunCursor, NativePageCursor};
46pub use database::{CheckIssue, Database};
47pub use encryption::{Cipher, PlaintextCipher};
48pub use engine::{
49    AggState, ApproxAgg, ApproxResult, CachedAgg, ColumnStat, IncrementalAggResult, NativeAgg,
50    NativeAggResult, Table,
51};
52pub use epoch::{Epoch, EpochAuthority, EpochClock, Snapshot};
53pub use error::{MongrelError, Result};
54pub use gc::{CheckReport, DoctorReport, GcReport};
55pub use index::{
56    AnnIndex, BitmapIndex, ColumnLearnedRange, FmIndex, HotIndex, LearnedIndex, SparseIndex,
57};
58pub use memtable::{Memtable, Row, Value};
59pub use mutable_run::MutableRun;
60pub use page::{CachedPage, Encoding, PageStat};
61pub use query::{Condition, Query};
62pub use reservoir::Reservoir;
63pub use retention::{OwnedSnapshotGuard, SnapshotGuard, SnapshotRegistry};
64pub use rowid::{RowId, RowIdAllocator};
65pub use schema::{AlterColumn, ColumnDef, ColumnFlags, IndexDef, IndexKind, Schema, TypeId};
66pub use sorted_run::{
67    read_column_dir, read_header, write_run, write_run_with, ColumnPayload, RunHeader, RunReader,
68    RunSpec, RunWriter,
69};
70pub use trace::{IndexRebuild, QueryTrace, ScanMode};
71pub use txn::{OwnedRow, PutResult, UpsertAction, UpsertActionKind, UpsertResult};
72pub use wal::{AddedRun, DdlOp, Op, Record, SharedWal, Wal, WalReader, SYSTEM_TXN_ID};
73
74#[cfg(feature = "encryption")]
75pub use encryption::{AesCipher, ColumnKeyDescriptor, EncryptionDescriptor, Kek};