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