Skip to main content

Module db

Module db 

Source
Expand description

Database handle and orchestration.

Database is implemented using internal modules open (bootstrap), replay (catalog and rows from segments), read / write / catalog_ops / maintenance (API surface), and helpers (name rules).

Structs§

Collection
Database
Opened ModelVault database: generic over a Store (FileStore on disk, VecStore in memory).
DatabaseFileScan
Result of a read-only file scan (header, superblock, segments, decoded catalog).
QueryBuilder
SharedDbState
Live in-memory snapshot mirrored by the writable handle.

Enums§

DatabaseScanMode
Controls whether segment framing / catalog decode runs during scan_database_file.

Constants§

SEGMENT_REGION_START
Byte offset where the append-only segment region begins (after header + dual superblocks).

Functions§

read_header_and_superblocks
Read and decode the fixed file header plus both redundant superblock slots.
rebuild_indexes_from_latest
Rebuild in-memory index state from catalog + latest rows (insert semantics only).
row_subset_by_field_defs
Build a row map containing only the listed fields (same rules as subset-model projection).
scan_database_file
Open path read-only and scan header, superblocks, and (when applicable) segments.
scan_database_store
Scan an already-open read-only FileStore.
select_superblock
Pick the newer valid superblock from the dual redundant slots.
verify_indexes_match_rows
Verify replayed index segments match what row data implies.