RowTransform
RowTransform = (
row,context) =>Record<string,unknown>
Defined in: packages/contracts/src/config.ts:307
Per-row rewrite applied in the proxy response path (after the row filter, before
column omission). Receives a shape-log 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.
It runs only in the proxy’s per-response path: it never alters the local PGlite schema,
never changes the Electric shape URL, and so never pollutes Electric’s shared shape
cache. Return the same row reference to signal “no change”.
Parameters
Section titled “Parameters”Record<string, unknown>
context
Section titled “context”Returns
Section titled “Returns”Record<string, unknown>