Expand description
Index store for NEDB v2.
Two index types:
-
ID index (
indexes/{coll}/id/{doc_id}→ object hash) Atomic file-per-document. Reading is a singlefs::read_to_string. Writing is atomic (write .tmp → rename). Parallel reads are lock-free. -
Sorted index (
indexes/{coll}/{field}.sorted→ in-memory BTreeMap) Rebuilt from object store on startup. Persisted as a compact binary file for fast cold start. Used for ORDER BY field ASC/DESC LIMIT n.
Structs§
- IdIndex
- Per-document ID index — atomic file-per-doc, sharded across 256 subdirs.
- Sorted
Indexes - In-memory sorted index per (collection, field). Rebuilt from object store on startup. O(log n) ORDER BY queries.
Enums§
- Ordered
Value - Ordered JSON value for BTree indexes (null < bool < number < string < array < object).