Expand description
Record layouts of the data model.
Every record is a fixed-size Slot living in an Arena; the byte
layouts below are format contracts — the snapshot is a memcpy of
the arenas, so changing an offset here changes the file format. The
layout tests compare against hand-written reference buffers: breaking a
layout breaks a test.
All integer fields are big-endian — mandatory for key prefixes (the arena sorts by raw bytes) and kept for payloads too, so a slot has one endianness throughout.
Modules§
- fact_
flags - Bit flags of
FactRecord::flags.
Structs§
- Edge
Slot - A typed graph edge (16-byte slot, Ordered arena, key
[a BE | rel BE | b BE], payloadfact). - Entity
ByName - Name → entity resolution record (8-byte slot, Ordered arena,
the whole slot is the key:
[name_term BE | id BE]). - Entity
Record - A graph node (24-byte slot, Uniform arena).
- FactAux
- Per-fact auxiliary record: the tag-list handle and the optional metadata
blob (20-byte slot, Uniform arena; layout
[id 4 | ListHandle 12 | meta 4]). - Fact
Record - The unit of memory: one fact (48-byte slot, Uniform arena).
- Temporal
Slot - Temporal index record (12-byte slot, Ordered arena, the whole
slot is the key:
[recorded_at BE | fact BE], no payload).
Constants§
- VALID_
TO_ OPEN valid_tovalue of an open fact (“true now”).