Skip to main content

Module model

Module model 

Source
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§

EdgeSlot
A typed graph edge (16-byte slot, Ordered arena, key [a BE | rel BE | b BE], payload fact).
EntityByName
Name → entity resolution record (8-byte slot, Ordered arena, the whole slot is the key: [name_term BE | id BE]).
EntityRecord
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]).
FactRecord
The unit of memory: one fact (48-byte slot, Uniform arena).
TemporalSlot
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_to value of an open fact (“true now”).