type SyncPersistenceCapabilityV1<TKey> = object;Defined in: packages/db/src/types.ts:602
Internal
Unstable cross-package protocol for persistence-aware adapters.
TKey extends string | number = string | number
readonly hydrateBaseline: () => Promise<void>;Defined in: packages/db/src/types.ts:611
Promise<void>
readonly optional managedCacheGeneration: boolean;Defined in: packages/db/src/types.ts:608
This run owns a claimed on-demand cache generation.
readonly protocol: "@tanstack/db/sync-persistence";Defined in: packages/db/src/types.ts:605
readonly reserveCommitTurn: () => void;Defined in: packages/db/src/types.ts:634
Reserve the open sync transaction's FIFO turn. Every persisted hydration that would start before it commits waits for that commit: a subset load, a reload or reset from a peer notice, and sequence-gap recovery. A subset load admitted while the turn is reserved also runs after the commit's durable write. The source must end the transaction: commit it, or abandon it by committing with an aborted signal. An abandon releases the waiting hydrations as a commit does, so they run. A peer reset abandons a reserved transaction that began before the reset: its commit rejects with SyncTransactionAbortedError, and the reset does not wait. Sequence-gap recovery counts as a hydration only from the point where it changes rows. A source that stops for good abandons it, or every later hydration keeps waiting. The source must not await a hydrateBaseline that it started before reserving while the reservation is open: that baseline waits for the commit. Calling hydrateBaseline while the reservation is open rejects.
void
readonly resumeSnapshot: object;Defined in: packages/db/src/types.ts:638
readonly certify: () => Promise<void>;Promise<void>
readonly expectCurrentCommit: () => void;void
readonly optional expectSourceProgress: (progress) => void;Atomically compare the durable source token with this transaction's predecessor. The source stages its next opaque string token in collection metadata at key. A discontinuity invalidates source progress evidence until an authoritative truncate; rows and receipts still apply normally. Re-delivering the same complete source position must be idempotent; it preserves existing evidence, including an earlier incompatibility. Only adapters that implement the durable comparison expose this method.
string
string | undefined
void
readonly getKeySetEvidence: () =>
| SyncPersistenceKeySetEvidence
| undefined;| SyncPersistenceKeySetEvidence | undefined
readonly optional getSourceProgressCompatible: () => boolean | undefined;Source progress evidence from the atomic persisted resume snapshot.
boolean | undefined
readonly scanPersistedRows: (options?) => Promise<SyncPersistenceScannedRow<TKey>[]>;Defined in: packages/db/src/types.ts:635
Promise<SyncPersistenceScannedRow<TKey>[]>
readonly optional startScopedRecovery: (resetMetadata?) => Promise<void>;Defined in: packages/db/src/types.ts:613
Retire untrusted on-demand rows and retain the provider's reset metadata.
string
unknown
Promise<void>
readonly optional startupCacheGenerationRotated: boolean;Defined in: packages/db/src/types.ts:610
The on-demand cache generation rotated before the source sync run entered.
readonly version: 1;Defined in: packages/db/src/types.ts:606