Expand description
Thin trait boundary over redb. marsdb-graph talks to this crate, never to
redb directly, so the underlying embedded KV engine could be swapped
without touching graph/query code. (A hand-rolled replacement engine was
prototyped and abandoned – redb stays; the boundary remains because it
costs nothing and keeps the dependency surface honest.)
Modules§
Structs§
- Multimap
Table Definition - Defines the name and types of a multimap table
- Read
Transaction - A read-only transaction
- Storage
Engine - Table
Definition - Defines the name and types of a table
- Write
Transaction - A read/write transaction
Enums§
- Multimap
Table Handle - Storage
Error - Table
Handle - Exposes
get/iter/rangeas plain inherent methods, not a fullredb::ReadableTabletrait impl — matching the whole trait (first/last/…) would be boilerplate for methods nothing calls.rangewas deliberately left out until a real call site needed it; v2’s composite-key adjacency (prefix scans overADJ_OUT/ADJ_IN) is that call site. - Txn
- Either kind of redb transaction — lets a function that only ever reads
(
.get()/.iter(), never.insert()/.remove()) run against a realWriteTransaction(the crash-safety boundary for a write statement) or aReadTransaction(so a read-only statement doesn’t have to contend for redb’s single-writer lock at all).WriteTransaction/ReadTransactionshare no common trait in redb itself —open_table/open_multimap_tableare inherent methods on two unrelated structs, returning different concrete types (Table/ReadOnlyTable,MultimapTable/ReadOnlyMultimapTable) — so this (andTableHandle/MultimapTableHandlebelow) is a small local abstraction over that, not something redb provides.
Constants§
- CURRENT_
FORMAT_ VERSION - Version of the MarsDB-owned tables and record encodings. This is separate from redb’s own file-format version.
- OLDEST_
SUPPORTED_ FORMAT_ VERSION