Rindle docs and package mapSkip to main content

mutation_to_json

Function mutation_to_json 

pub fn mutation_to_json(m: &Mutation) -> Value
Expand description

The change-source ingest shape of one row change (the contract the daemon’s /apply-row-change-txn endpoint, the master’s change-log chunks, and the replicator fan-out all speak): add → { row }, remove → { old }, edit → { old, row } (row is the NEW row, and only PK cells of old are read on apply). Distinct from normalized_op_to_json, which is the OUTBOUND batch wire (edit carries new) and deliberately collapses Int to a JS number; this codec is integer-exact (design 226 Stage D — see ingest_cell_to_json). One codec so the master payload, the fan-out frames, and the HTTP ingest never drift. CAVEAT: the room’s write-behind flush emits this same ingest SHAPE through a different encoder (rindle-wire::wire_json::row_change_to_json), which still renders Int in float form — decode-side consumers pattern-matching OwnedValue::Int on flushed rows (the lmid outcome-retention prune) therefore never see Int from that emitter today; unifying it onto this codec would activate them.