Skip to main content

OnChangeQueryProcessor<Data>

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
Data

Constructors

new OnChangeQueryProcessor()

new OnChangeQueryProcessor<Data>(options): OnChangeQueryProcessor<Data>

Parameters

ParameterType
optionsOnChangeQueryProcessorOptions<Data>

Returns

OnChangeQueryProcessor<Data>

Overrides

AbstractQueryProcessor.constructor

Properties

PropertyModifierTypeDescriptionInherited from
statereadonlyWatchedQueryState<Data>Current state of the watched query.AbstractQueryProcessor.state

Accessors

closed

Get Signature

get closed(): boolean
Returns

boolean

Inherited from

AbstractQueryProcessor.closed


listenerMeta

Get Signature

get listenerMeta(): ListenerMetaManager<Listener>
Returns

ListenerMetaManager<Listener>

Inherited from

AbstractQueryProcessor.listenerMeta

Methods

close()

close(): Promise<void>

Close the watched query and end all subscriptions.

Returns

Promise<void>

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<Data>>

Returns

Function

Returns

void

Inherited from

AbstractQueryProcessor.registerListener


updateSettings()

updateSettings(settings): Promise<void>

Updates the underlying query.

Parameters

ParameterType
settingsWatchedQuerySettings

Returns

Promise<void>

Inherited from

AbstractQueryProcessor.updateSettings