Skip to content

SyncRow

SyncRow = Record<string, unknown>

Defined in: packages/contracts/src/stream-envelope.ts:82

One change as the APPLIER consumes it, after an envelope has been resolved against its table.

Distinct from StreamEnvelope on purpose. An envelope is the wire form — key-only on a delete, headers carrying transport metadata. This is what the apply path needs instead: a value that is always present (a delete’s is its reconstructed primary key), and the transport metadata dropped.

The operation set is StreamOperation’s, unchanged. The applier used to narrow the wire’s four verbs down to three DML verbs; there are only two verbs to carry now, and inventing a DML distinction the engine never made is what the translator got wrong.

value is Record<string, unknown> rather than StreamRow because the applier handles values the wire never carries — a bigint id kept as a string for precision, a JSON column arriving as a parsed object — and narrowing here would only push casts into the codecs.