CanonicalReadContract
Defined in: packages/contracts/src/fingerprint.ts:266
The read contract of a single sync table: the subset of its canonical shape that decides what data streams down and how a row is identified and filtered — synced-table name, columns, primary key (and any local-PK override), column omission, and the shape (physical table + row filter). It is the stable identity a writable entry shares with its asReadonly projection.
Deliberately EXCLUDES the two axes a per-client projection may legitimately differ on:
- write capability —
mode, the overlay/journal projection,managedFields,conflictPolicy,writeMode(one client writes the table, another only reads it); - lifecycle orchestration —
consistencyGroup,subscription,retention(a client may eager- or lazy-load, or group differently, without changing the data it sees).
What it pins is the data itself: two registries that present “the same” logical table to different
clients must agree here, or those clients are silently seeing different rows/columns. As with the
full registry fingerprint, the customPredicate body is invisible — only its presence and the
consumer-bumped RowFilterSpec.revision participate, so bump revision to force a divergence
a logic-only change would otherwise hide.
Properties
Section titled “Properties”columns
Section titled “columns”columns:
CanonicalColumn[]
Defined in: packages/contracts/src/fingerprint.ts:270
localPrimaryKey
Section titled “localPrimaryKey”localPrimaryKey:
string[] |null
Defined in: packages/contracts/src/fingerprint.ts:269
omitColumns
Section titled “omitColumns”omitColumns:
string[]
Defined in: packages/contracts/src/fingerprint.ts:271
primaryKey
Section titled “primaryKey”primaryKey:
string[]
Defined in: packages/contracts/src/fingerprint.ts:268
shape: {
physicalTable:string|null;rowFilter:CanonicalRowFilter|null;scope:string[] |null;shapeKey:string;tableName:string;where:string|null; } |null
Defined in: packages/contracts/src/fingerprint.ts:272
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ physicalTable: string | null; rowFilter: CanonicalRowFilter | null; scope: string[] | null; shapeKey: string; tableName: string; where: string | null; }
physicalTable
Section titled “physicalTable”physicalTable:
string|null
rowFilter
Section titled “rowFilter”rowFilter:
CanonicalRowFilter|null
scope:
string[] |null
Shared-tier scope columns, in declaration order — the order parameterizes the family.
shapeKey
Section titled “shapeKey”shapeKey:
string
tableName
Section titled “tableName”tableName:
string
where:
string|null
The native static predicate, canonicalized in full.
Unlike customPredicate, this one is visible: an AST can be hashed, where a closure could only
ever be fingerprinted by its presence. So the revision footgun does not apply here — editing
a native where shifts the fingerprint by itself, and a consumer cannot forget to say so.
null
syncedTable
Section titled “syncedTable”syncedTable:
string
Defined in: packages/contracts/src/fingerprint.ts:267