abstract AbstractStreamingSyncImplementation
Extends
Implements
Constructors
new AbstractStreamingSyncImplementation()
new AbstractStreamingSyncImplementation(options): AbstractStreamingSyncImplementation
Parameters
| Parameter | Type |
|---|---|
options | AbstractStreamingSyncImplementationOptions |
Returns
AbstractStreamingSyncImplementation
Overrides
Properties
| Property | Type |
|---|---|
syncStatus | SyncStatus |
triggerCrudUpload | () => void |
Accessors
isConnected
Get Signature
get isConnected(): boolean
Returns
boolean
Implementation of
StreamingSyncImplementation.isConnected
lastSyncedAt
Get Signature
get lastSyncedAt(): undefined | Date
Returns
undefined | Date
Implementation of
StreamingSyncImplementation.lastSyncedAt
Methods
connect()
connect(options?): Promise<void>
Connects to the sync service
Parameters
| Parameter | Type |
|---|---|
options? | PowerSyncConnectionOptions |
Returns
Promise<void>
Implementation of
StreamingSyncImplementation.connect
disconnect()
disconnect(): Promise<void>
Disconnects from the sync services.
Returns
Promise<void>
Throws
if not connected or if abort is not controlled internally
Implementation of
StreamingSyncImplementation.disconnect
dispose()
dispose(): Promise<void>
Returns
Promise<void>
Implementation of
StreamingSyncImplementation.dispose
Overrides
getWriteCheckpoint()
getWriteCheckpoint(): Promise<string>
Returns
Promise<string>
Implementation of
StreamingSyncImplementation.getWriteCheckpoint
hasCompletedSync()
hasCompletedSync(): Promise<boolean>
Returns
Promise<boolean>
Implementation of
StreamingSyncImplementation.hasCompletedSync
iterateAsyncListeners()
iterateAsyncListeners(cb): Promise<void>
Parameters
| Parameter | Type |
|---|---|
cb | (listener) => Promise<any> |
Returns
Promise<void>
Inherited from
BaseObserver.iterateAsyncListeners
iterateListeners()
iterateListeners(cb): void
Parameters
| Parameter | Type |
|---|---|
cb | (listener) => any |
Returns
void
Inherited from
obtainLock()
abstract obtainLock<T>(lockOptions): Promise<T>
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
lockOptions | LockOptions<T> |
Returns
Promise<T>
registerListener()
registerListener(listener): () => void
Register a listener for updates to the PowerSync client.
Parameters
| Parameter | Type |
|---|---|
listener | Partial<StreamingSyncImplementationListener> |
Returns
Function
Returns
void
Implementation of
StreamingSyncImplementation.registerListener
Inherited from
streamingSync()
streamingSync(signal?, options?): Promise<void>
Parameters
| Parameter | Type |
|---|---|
signal? | AbortSignal |
options? | PowerSyncConnectionOptions |
Returns
Promise<void>
Deprecated
use [connect instead]
updateSubscriptions()
updateSubscriptions(subscriptions): void
Parameters
| Parameter | Type |
|---|---|
subscriptions | SubscribedStream[] |
Returns
void
Implementation of
StreamingSyncImplementation.updateSubscriptions
waitForReady()
waitForReady(): Promise<void>
Returns
Promise<void>
Implementation of
StreamingSyncImplementation.waitForReady
waitForStatus()
waitForStatus(status): Promise<void>
Parameters
| Parameter | Type |
|---|---|
status | SyncStatusOptions |
Returns
Promise<void>
Implementation of
StreamingSyncImplementation.waitForStatus
waitUntilStatusMatches()
waitUntilStatusMatches(predicate): Promise<void>
Parameters
| Parameter | Type |
|---|---|
predicate | (status) => boolean |
Returns
Promise<void>