Skip to content

RowTransform

RowTransform = (row, context) => Record<string, unknown>

Defined in: packages/contracts/src/config.ts:536

Per-row rewrite applied on the server’s read egress path (after the row filter, before column omission). Receives a streamed row’s column map (keys are wire/column names) and returns a possibly-rewritten one — letting the server strip a sub-document of a jsonb column, or otherwise rewrite a value, conditionally on row data. This expresses what a static, whole-column omitColumns cannot.

Server authority only: it never alters the local pgwasm schema and never alters the shape definition — the engine ref-counts shapes by definition (ADR-0055), so a transform can neither change which stream a subject reads nor split one that would otherwise be shared. Return the same row reference to signal “no change”.

Record<string, unknown>

RowTransformContext

Record<string, unknown>