Defined in: packages/db/src/types.ts:445
T extends object = Record<string, unknown>
TKey extends string | number = string | number
optional exportSyncMeta: () => unknown;Defined in: packages/db/src/types.ts:500
Export adapter-specific metadata that lets hydration/persistence resume sync. The payload shape is owned by the adapter.
unknown
optional getSyncMetadata: () => Record<string, unknown>;Defined in: packages/db/src/types.ts:494
Get the sync metadata for insert operations
Record<string, unknown>
Record containing relation information
optional importSyncMeta: (meta) => void;Defined in: packages/db/src/types.ts:505
Import adapter-specific metadata produced by exportSyncMeta.
unknown
void
optional mergeSyncMeta: (current, incoming) => unknown;Defined in: packages/db/src/types.ts:510
Merge two adapter-specific metadata payloads during hydration.
unknown
unknown
unknown
optional rowUpdateMode: "full" | "partial";Defined in: packages/db/src/types.ts:519
The row update mode used to sync to the collection.
partial
sync: (params) =>
| void
| CleanupFn
| SyncConfigRes;Defined in: packages/db/src/types.ts:449
() => void
Begin a new sync transaction.
Collection<T, TKey, any, any, any>
(signal?) => SyncAppliedReceipt
Commit the active sync transaction in FIFO order. Core accepts it at once, and an accepted transaction always applies. Returns true when its writes are visible, or a receipt that resolves when they become visible. While an optimistic transaction is persisting, it becomes visible when that transaction settles, together with the drop of its optimistic state. A signal that is already aborted abandons the transaction before acceptance, and the receipt rejects with an error named AbortError. Aborting after acceptance has no effect.
() => void
Report that rows this adapter serves for loaded subsets may have shifted between served pages, after a refetch that the adapter started on its own has applied. Each ordered live query then re-establishes its window with a bounded repair from the start of its order. Calls in one turn are coalesced. Do not call it for results that answer a loadSubset call.
(error?) => void
Signal that initial sync failed before producing a usable snapshot. When supplied, error is preserved as the rejection reason from preload().
() => void
Signal that a usable initial or recovered snapshot is available.
SyncMetadataApi<TKey>
(options?) => void
Replace the synced rows. By default the replacement also marks the Collection ready. Set markReady:false to publish without changing status, for example when confirming a committed write from a closed source. The last truncate in a transaction supplies its readiness intent.
(message) => void
| void | CleanupFn | SyncConfigRes