@syncular/client 0.20.1 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/schema.ts CHANGED
@@ -318,6 +318,9 @@ function createSyncedTable(
318
318
  db: ClientDatabase,
319
319
  table: CompiledClientTable,
320
320
  ): void {
321
+ // §6.11: a declared reference is deliberately NOT emitted here. Windowing
322
+ // evicts a parent independently of its children, so local SQLite never
323
+ // enforces a reference; the server enforces it.
321
324
  const columns = table.columns.map((column) => {
322
325
  const notNull = column.nullable ? '' : ' NOT NULL';
323
326
  const pk = column.name === table.primaryKey ? ' PRIMARY KEY' : '';
@@ -716,7 +719,10 @@ export function normalizeRecordKeys(
716
719
  * may surface integers as bigint. Anything else passes through untouched —
717
720
  * the codec still fails loud on genuine type garbage at encode time.
718
721
  */
719
- function coerceSqlRepresentation(column: RowColumn, value: unknown): unknown {
722
+ export function coerceSqlRepresentation(
723
+ column: RowColumn,
724
+ value: unknown,
725
+ ): unknown {
720
726
  switch (localColumnType(column)) {
721
727
  case 'boolean':
722
728
  return value === 0 ? false : value === 1 ? true : value;