Skip to main content

Module database

Module database 

Source
Expand description

Multi-table Database container (spec §5, §6, §10).

Owns the shared services — catalog, dual-counter epoch authority, shared raw/decoded page caches, snapshot-retention registry, and the DB-wide KEK — and mounts per-table Table engines under tables/<id>/ that borrow them. P1 scope: per-table WALs remain (collapsed into one shared WAL in P2); the win here is one consistent commit clock across tables and one reopen path.

Structs§

ChangeEvent
A data-change event published on commit (CDC / NOTIFY-LISTEN).
CheckIssue
An integrity issue found by Database::check (spec §16).
Database
A multi-table database: one catalog, one epoch clock, shared caches, a shared WAL, and a live map of name → Arc<Table>.
ExternalTriggerWriteResult

Enums§

ExternalTriggerBaseWrite
ExternalTriggerWrite

Constants§

EXTERNAL_TABLE_ID
Sentinel table_id for CheckIssues that concern external-table module state instead of an ordinary table.
KEYS_FILENAME
META_DIR
TABLES_DIR
VTAB_DIR
WAL_TABLE_ID
Sentinel table_id for CheckIssues that concern the shared WAL rather than any table. u64::MAX is never allocated to a real table (the catalog mints ids from 0 upward), so Database::doctor can safely skip them.

Traits§

ExternalTriggerBridge

Type Aliases§

TableHandle
A handle to a live table inside a Database. Writes take the inner lock (P1); P3.3 replaces this with lock-free ArcSwap reads + a publish lock for writes.