appendLogCommittedFactJournal()
Build a single-writer committed-fact journal over one passive append log.
One canonical batch is one storage entry, so readable storage never exposes a partial batch. Calls through one handle are serialized. Competing handles, retention, migration, restore, hot hydration, and domain materialization are deliberately outside this contract.
Import
Section titled “Import”import { appendLogCommittedFactJournal } from "@graphrefly/ts/committed-facts";Signature
Section titled “Signature”function appendLogCommittedFactJournal(opts: AppendLogCommittedFactJournalOptions<TFact, TBatch, TCursor>): CommittedFactJournalBackend<TBatch, TFact, TCursor>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
opts | AppendLogCommittedFactJournalOptions<TFact, TBatch, TCursor> | Passive append log, domain validator/cursor profile, and bounded diagnostics. |
Returns
Section titled “Returns”A serialized domain-neutral committed-fact journal handle.
Example
Section titled “Example”import { appendLogCommittedFactJournal } from "@graphrefly/ts/committed-facts";import { memoryAppendLog } from "@graphrefly/ts/storage";
const journal = appendLogCommittedFactJournal({ log: memoryAppendLog("work-facts"), profile,});Source
Section titled “Source”packages/ts/src/committed-facts/index.ts