Skip to content

ShapeSpec

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

optional electricTable?: string

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

INTERNAL / resolved — the physical Postgres table this shape reads, when it differs from the shape’s own tableName. A read PROJECTION (defineReadProjection) sets it to the OWNING table’s name so several shapes can read one physical table under distinct shapeKeys; the engine resolves an incoming request by shapeKey and consults this only on egress, to build the upstream Electric table param. attachSyncRegistrySchema also fills/qualifies it for schema-bound registries.

Not a consumer input — there is no valid reason to hand-set it (it can only be redundant with, or wrong about, the table you are reading), so it is omitted from ShapeSpecInput. The combinator derives it from the owner; defineSyncTable never sets it from input.


optional rowFilter?: RowFilterSpec

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


shapeKey: string

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


tableName: string

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