DifferentialQueryProcessor<RowType>
Internal
Uses the PowerSync onChange event to trigger watched queries. Results are emitted on every change of the relevant tables.
Extends
AbstractQueryProcessor
<ReadonlyArray
<Readonly
<RowType
>>,DifferentialWatchedQuerySettings
<RowType
>>
Type Parameters
Type Parameter |
---|
RowType |
Implements
DifferentialWatchedQuery
<RowType
>
Constructors
new DifferentialQueryProcessor()
new DifferentialQueryProcessor<RowType>(options): DifferentialQueryProcessor<RowType>
Parameters
Parameter | Type |
---|---|
options | DifferentialQueryProcessorOptions <RowType > |
Returns
DifferentialQueryProcessor
<RowType
>
Overrides
AbstractQueryProcessor
.constructor
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
state | readonly | WatchedQueryState <readonly Readonly <RowType >[]> | Current state of the watched query. | DifferentialWatchedQuery.state AbstractQueryProcessor .state |
Accessors
closed
Get Signature
get closed(): boolean
Returns
boolean
Implementation of
DifferentialWatchedQuery.closed
Inherited from
listenerMeta
Get Signature
get listenerMeta(): ListenerMetaManager<Listener>
Returns
ListenerMetaManager
<Listener
>
Implementation of
DifferentialWatchedQuery.listenerMeta
Inherited from
AbstractQueryProcessor
.listenerMeta
Methods
close()
close(): Promise<void>
Close the watched query and end all subscriptions.
Returns
Promise
<void
>
Implementation of
DifferentialWatchedQuery.close
Inherited from
dispose()
dispose(): void
Returns
void
Inherited from
AbstractQueryProcessor
.dispose
iterateAsyncListeners()
iterateAsyncListeners(cb): Promise<void>
Parameters
Parameter | Type |
---|---|
cb | (listener ) => Promise <any > |
Returns
Promise
<void
>
Inherited from
AbstractQueryProcessor
.iterateAsyncListeners
iterateListeners()
iterateListeners(cb): void
Parameters
Parameter | Type |
---|---|
cb | (listener ) => any |
Returns
void
Inherited from
AbstractQueryProcessor
.iterateListeners
registerListener()
registerListener(listener): () => void
Register a listener for updates to the PowerSync client.
Parameters
Parameter | Type |
---|---|
listener | Partial <WatchedQueryProcessorListener <readonly Readonly <RowType >[]>> |
Returns
Function
Returns
void
Implementation of
DifferentialWatchedQuery.registerListener
Inherited from
AbstractQueryProcessor
.registerListener
updateSettings()
updateSettings(settings): Promise<void>
Updates the underlying query.
Parameters
Parameter | Type |
---|---|
settings | DifferentialWatchedQuerySettings |
Returns
Promise
<void
>
Implementation of
DifferentialWatchedQuery.updateSettings