Skip to main content

Module merge_fields

Module merge_fields 

Source
Expand description

Unframed fields of snapshot merge metadata, also used in coven’s SQLite blobs.

These are the same bytes as the corresponding snapshot fields, using the shared bounded encoder and decoder. The containing database schema or frame supplies the format version. Decoders reject trailing bytes and malformed fields; relationships between fields and writes remain merge’s responsibility.

Functions§

decode_change_id
Decode exactly one original row change identity.
decode_change_verdict
Decode a change’s verdict stored with its original change.
decode_column_value
Decode exactly one snapshot field containing a lost cell value and its parents.
decode_columns
Decode exactly one snapshot field containing a removed row’s values and parents.
decode_dependency
Decode a dependent change’s write and failed sources.
decode_exclusion
Decode an excluded write’s identity and breaking version from its loss record.
decode_foreign_key
Decode exactly one foreign key identity.
decode_loss
Decode one retained loss using the snapshot loss fields.
decode_merge_row
Decode a retained merge row against its original checked write metadata.
decode_multiproof
Decode a retained authorship opening.
decode_rules
Decode exactly one snapshot field containing removal rules.
decode_setters
Decode exactly one snapshot field containing a removed row’s setters.
decode_timestamp
Decode exactly one snapshot field containing a write timestamp.
decode_unauthorized
Decode an unauthorized change’s write and reason.
decode_unique_constraint
Decode exactly one unique constraint identity.
decode_write_header
Decode a retained write header. Its checks ran when the write was accepted.
decode_write_id
Decode exactly one snapshot field containing a setter or replacing write.
encode_change_id
Encode an original row change’s identity using its D5 field bytes.
encode_change_verdict
Encode a change’s verdict with the bytes its snapshot evidence uses.
encode_column_value
Encode a lost cell value and its parents using its snapshot field bytes.
encode_columns
Encode a removed row’s values and parents using its snapshot field bytes.
encode_dependency
Encode a dependent change’s write and failed sources for its loss record.
encode_exclusion
Encode the excluded write and the breaking schema version that excluded it.
encode_foreign_key
Encode a foreign key’s stable identity using its snapshot field bytes.
encode_loss
Encode one loss using the same bytes as the snapshot loss section.
encode_merge_row
Encode retained generations and winning cells using the snapshot merge fields.
encode_multiproof
Encode a retained authorship opening using its D7 field bytes.
encode_rules
Encode removal rules using its snapshot field bytes.
encode_setters
Encode a removed row’s setters using its snapshot field bytes.
encode_timestamp
Encode a write timestamp using its snapshot field bytes.
encode_unauthorized
Encode an unauthorized change’s write and reason for its loss record.
encode_unique_constraint
Encode a unique constraint’s terms and partial predicate.
encode_write_frame
Encode a received row change, execution or dismissal as its D5 frame for local retention. Decoding with WriteFrame::decode checks it again before it is reapplied.
encode_write_header
Encode a received write header for local retention, using its D5 field bytes. The receiving transaction checks the write; a refused write commits nothing.
encode_write_id
Encode a setter or replacing write using its snapshot field bytes.