Defined in: packages/db/src/types.ts:419
T extends object = Record<string, unknown>
TKey extends string | number = string | number
optional exportSyncMeta: () => unknown;Defined in: packages/db/src/types.ts:460
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:454
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:465
Import adapter-specific metadata produced by exportSyncMeta.
unknown
void
optional mergeSyncMeta: (current, incoming) => unknown;Defined in: packages/db/src/types.ts:470
Merge two adapter-specific metadata payloads during hydration.
unknown
unknown
unknown
optional rowUpdateMode: "full" | "partial";Defined in: packages/db/src/types.ts:479
The row update mode used to sync to the collection.
partial
sync: (params) =>
| void
| CleanupFn
| SyncConfigRes;Defined in: packages/db/src/types.ts:423
() => 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.
(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>
() => void
(message) => void
| void | CleanupFn | SyncConfigRes