Skip to main content

DifferentialQueryProcessor<RowType>

Internal

Uses the PowerSync onChange event to trigger watched queries. Results are emitted on every change of the relevant tables.

Extends

Type Parameters

Type Parameter
RowType

Implements

Constructors

new DifferentialQueryProcessor()

new DifferentialQueryProcessor<RowType>(options): DifferentialQueryProcessor<RowType>

Parameters

ParameterType
optionsDifferentialQueryProcessorOptions<RowType>

Returns

DifferentialQueryProcessor<RowType>

Overrides

AbstractQueryProcessor.constructor

Properties

PropertyModifierTypeDescriptionInherited from
statereadonlyWatchedQueryState<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

AbstractQueryProcessor.closed


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

AbstractQueryProcessor.close


dispose()

dispose(): void

Returns

void

Inherited from

AbstractQueryProcessor.dispose


iterateAsyncListeners()

iterateAsyncListeners(cb): Promise<void>

Parameters

ParameterType
cb(listener) => Promise<any>

Returns

Promise<void>

Inherited from

AbstractQueryProcessor.iterateAsyncListeners


iterateListeners()

iterateListeners(cb): void

Parameters

ParameterType
cb(listener) => any

Returns

void

Inherited from

AbstractQueryProcessor.iterateListeners


registerListener()

registerListener(listener): () => void

Register a listener for updates to the PowerSync client.

Parameters

ParameterType
listenerPartial<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

ParameterType
settingsDifferentialWatchedQuerySettings

Returns

Promise<void>

Implementation of

DifferentialWatchedQuery.updateSettings

Inherited from

AbstractQueryProcessor.updateSettings