ClientProjectionSpec
Defined in: packages/contracts/src/config.ts:561
Properties
Section titled “Properties”journalTable?
Section titled “journalTable?”
optionaljournalTable?:string
Defined in: packages/contracts/src/config.ts:564
localIndexes?
Section titled “localIndexes?”
optionallocalIndexes?: readonlyLocalIndexSpec[]
Defined in: packages/contracts/src/config.ts:582
OPT-IN local indexes for this entry’s synced table (ADR-0029 D3’s renderer, consumer-declared).
The local store renders a table’s PRIMARY KEY and nothing else — a synced table’s server-side indexes are NOT mirrored, deliberately: they serve server loads, and half of them cover columns a client projection omits. So a local read path that needs an index has to say so here, and only here.
Declare what the CLIENT’s queries need, not what the server has: a scan the app runs on every render
over a large synced table (the motivating case: a due_at window over 100k rows — ~13 ms sequential
vs ~0.1 ms indexed on pgwasm, logged by tests/unit/read-model-overlay-plan). Each index costs write
time on every applied batch and space in the user’s store, so an index nothing queries is a straight loss.
Rendered on the synced table ONLY — never on the overlay, whose primary key is already its index and whose plan problem is not an index problem (see the read model’s non-membership test).
localPrimaryKey?
Section titled “localPrimaryKey?”
optionallocalPrimaryKey?:PrimaryKeySpec
Defined in: packages/contracts/src/config.ts:566
omitColumns?
Section titled “omitColumns?”
optionalomitColumns?: readonlystring[]
Defined in: packages/contracts/src/config.ts:565
overlayTable?
Section titled “overlayTable?”
optionaloverlayTable?:string
Defined in: packages/contracts/src/config.ts:563
syncedTable?
Section titled “syncedTable?”
optionalsyncedTable?:string
Defined in: packages/contracts/src/config.ts:562