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(FileStoreon disk,VecStorein memory). - Database
File Scan - Result of a read-only file scan (header, superblock, segments, decoded catalog).
- Query
Builder - Shared
DbState - Live in-memory snapshot mirrored by the writable handle.
Enums§
- Database
Scan Mode - 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
pathread-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.