Skip to main content

SharedWebStreamingSyncImplementation

Extends

Constructors

new SharedWebStreamingSyncImplementation()

new SharedWebStreamingSyncImplementation(options): SharedWebStreamingSyncImplementation

Parameters

ParameterType
optionsWebStreamingSyncImplementationOptions

Returns

SharedWebStreamingSyncImplementation

Overrides

WebStreamingSyncImplementation.constructor

Properties

PropertyTypeInherited from
syncStatusSyncStatusWebStreamingSyncImplementation.syncStatus
triggerCrudUpload() => voidWebStreamingSyncImplementation.triggerCrudUpload

Accessors

isConnected

get isConnected(): boolean

Returns

boolean


lastSyncedAt

get lastSyncedAt(): undefined | Date

Returns

undefined | Date


webOptions

get webOptions(): WebStreamingSyncImplementationOptions

Returns

WebStreamingSyncImplementationOptions

Methods

connect()

connect(options?): Promise<void>

Starts the sync process, this effectively acts as a call to connect if not yet connected.

Parameters

ParameterType
options?PowerSyncConnectionOptions

Returns

Promise<void>

Overrides

WebStreamingSyncImplementation.connect


disconnect()

disconnect(): Promise<void>

Disconnects from the sync services.

Returns

Promise<void>

Overrides

WebStreamingSyncImplementation.disconnect

Throws

if not connected or if abort is not controlled internally


dispose()

dispose(): Promise<void>

Returns

Promise<void>

Overrides

WebStreamingSyncImplementation.dispose


getWriteCheckpoint()

getWriteCheckpoint(): Promise<string>

Returns

Promise<string>

Overrides

WebStreamingSyncImplementation.getWriteCheckpoint


hasCompletedSync()

hasCompletedSync(): Promise<boolean>

Returns

Promise<boolean>

Overrides

WebStreamingSyncImplementation.hasCompletedSync


iterateAsyncListeners()

iterateAsyncListeners(cb): Promise<void>

Parameters

ParameterType
cb(listener) => Promise<any>

Returns

Promise<void>

Inherited from

WebStreamingSyncImplementation.iterateAsyncListeners


iterateListeners()

iterateListeners(cb): void

Parameters

ParameterType
cb(listener) => any

Returns

void

Inherited from

WebStreamingSyncImplementation.iterateListeners


obtainLock()

obtainLock<T>(lockOptions): Promise<T>

Type parameters

Type parameter
T

Parameters

ParameterType
lockOptionsLockOptions<T>

Returns

Promise<T>

Inherited from

WebStreamingSyncImplementation.obtainLock


registerListener()

registerListener(listener): () => void

Register a listener for updates to the PowerSync client.

Parameters

ParameterType
listenerPartial<StreamingSyncImplementationListener>

Returns

Function

Returns

void

Inherited from

WebStreamingSyncImplementation.registerListener


streamingSync()

streamingSync(signal?, options?): Promise<void>

Parameters

ParameterType
signal?AbortSignal
options?PowerSyncConnectionOptions

Returns

Promise<void>

Inherited from

WebStreamingSyncImplementation.streamingSync

Deprecated

use [connect instead]


waitForReady()

waitForReady(): Promise<void>

Returns

Promise<void>

Overrides

WebStreamingSyncImplementation.waitForReady


waitForStatus()

waitForStatus(status): Promise<void>

Parameters

ParameterType
statusSyncStatusOptions

Returns

Promise<void>

Inherited from

WebStreamingSyncImplementation.waitForStatus