Skip to content

AttachedSyncClient

AttachedSyncClient<TRegistry> = SyncClient<TRegistry> & object

Defined in: packages/client/src/worker/attach-sync-client.ts:758

The worker-attached client: SyncClient’s shape, worker-proxied, plus notifyAuthChanged (re-push the token after an app auth-state change, ADR-0032 decision 3). One-shot Drizzle reads (query/queryRow/queryRaw/queryRawRow) and ensureSynced ARE proxied to the worker; the members that throw are the structurally unproxiable ones — pglite, destroy, dropReadCache, isSynced, and drizzle.transaction().

notifyAuthChanged: () => void

void

setOnline: (online) => void

Forward the app’s Offline toggle to the worker (ADR-0032 S3). The worker owns convergence, so the tab cannot gate a local trigger; this sends set-online, which suppresses/resumes the worker’s flush passes (resuming fires one immediate pass). The in-process client gates its own autoSync instead.

boolean

void

TRegistry extends SyncTableRegistry