Expand description
Pure, I/O-free encodings between the io_replica model and the
pimdir columns (spec §13). No SQLite, no filesystem: the part an
Android or any other implementation reuses.
Beside the column encodings it holds the action-queue payload codec
(spec §15.3): the six v1 action kinds as PimdirAction, encoded to
and from the versioned JSON queue.payload column.
Enums§
- Pimdir
Action - A queued mutation request (spec §15.3): what a producer appends to the
queuetable and the owner applies to the store. - Pimdir
Action Error - A malformed action payload; the owner parks the row instead of applying it.
Functions§
- action_
from_ payload - Decodes a
queue.actionkind plus itsqueue.payloadJSON back to aPimdirAction, the inverse ofaction_to_payload. Strict, unlike the lenient column decoders: a malformed payload is an error the owner parks the row with, never a silently-empty action. - action_
to_ payload - Encodes an action to its versioned JSON
queue.payloadcolumn (spec §15.3,v: 1). Absent optional fields are omitted;metaembeds as parsed JSON when it is valid JSON, else as a JSON string. - flags_
from_ json - The inverse of
flags_to_json: aNULLcolumn decodes to the unknown set, and so does a column this cannot read. - flags_
to_ json - A flag set to its canonical JSON array, the model’s set being already
sorted, or
Nonefor the column’sNULL. - level_
from_ int - The inverse of
level_to_int; unknown integers clamp toProbed. - level_
to_ int - The detail ladder as its column integer (spec §13).