Skip to main content

Module transaction_journal_encode

Module transaction_journal_encode 

Source
Expand description

The exact encoding of every journal record. What: The exact encoding of every schema-version-2 journal record: compact JSON in the incumbent’s field order, one record per line. Why: writeJournalRecord writes JSON.stringify(record) and a newline; the native wrapper writes the same bytes for the same values so either wrapper can recover the other’s transactions.

In TS you’d write (pseudocode):

`${JSON.stringify(record)}\n`

Functions§

conclusion_name
What: The wire spelling of a conclusion kind. Why: Shared by encoding and its tests.
encode_index_lock
What: Encode index-lock-<n>.json with its trailing newline. Why: See encode_preparing.
encode_landing
What: Encode landing-<n>.json with its trailing newline; optional fields are omitted when absent, as JSON.stringify omits undefined. Why: See encode_preparing.
encode_prepared
What: Encode prepared.json with its trailing newline. Why: See encode_preparing.
encode_preparing
What: Encode preparing.json with its trailing newline. Why: writeJournalRecord writes JSON.stringify(record) and a newline.
encode_ref_updated
What: Encode ref-updated.json with its trailing newline. Why: See encode_preparing.
mode_name
What: The wire spelling of a mode. Why: Shared by encoding and its tests.
ref_format_name
What: The wire spelling of a ref format. Why: Shared by encoding and its tests.