本页还没有译文
本页 18 段还没译成Português (BR),下面显示的是英文原文。CreateLiveQueryObserverOptions
还没翻译译自英文(tanstack.com)本页 18 段都还没译
Defined in: packages/db/src/live-query-observer.ts:1140
Properties
client?
optional client: DbClient;Defined in: packages/db/src/live-query-observer.ts:1157
DbClient cache that owns SSR snapshots for this query identity.
mode?
optional mode: "granular" | "wholesale";Defined in: packages/db/src/live-query-observer.ts:1155
How subscribers consume the observer:
granular(default): subscribers apply the deliveredChangeMessage[]deltas to their own keyed state (Vue/Svelte/Solid). The observer subscribes with initial state and seeds late subscribers, so every subscriber converges from deltas alone.wholesale: subscribers treat notifications as a wake-up and re-readgetSnapshot()(React/Angular). The observer subscribes WITHOUT initial state, preserving those adapters' loading policy — no snapshot request, so no unfilteredloadSubsetagainst on-demand collections. Nothing is delivered synchronously duringsubscribe, which keepsuseSyncExternalStore-style consumers safe by construction.
onPreload()?
optional onPreload: () => void;Defined in: packages/db/src/live-query-observer.ts:1161
Resume framework-deferred query sources before a server preload.
Returns
void
queryHash?
optional queryHash: string;Defined in: packages/db/src/live-query-observer.ts:1159
Stable live-query identity used for dehydration and hydration.
AI 翻译查看英文原文