OnDemandSyncHooks
type OnDemandSyncHooks = object;Defined in: definitions.ts:189
On-demand sync mode hooks. Called each time a subset is loaded or unloaded in response to live query changes.
Properties
onLoad?
optional onLoad: never;Defined in: definitions.ts:191
onLoadSubset()?
optional onLoadSubset: (options) => CleanupFn | void | Promise<CleanupFn | void>;Defined in: definitions.ts:200
Called when a subset of data is requested by a live query. Use this to set up external data sources for the requested subset (e.g. subscribing to a sync stream with parameters derived from the query predicate).
Parameters
options
LoadSubsetOptions
Returns
CleanupFn | void | Promise<CleanupFn | void>
A cleanup function that is called when the subset is unloaded.
syncMode
syncMode: "on-demand";Defined in: definitions.ts:190