SqliteBucketStorage
Extends
Implements
Constructors
new SqliteBucketStorage()
new SqliteBucketStorage(db, logger?): SqliteBucketStorage
Parameters
| Parameter | Type |
|---|---|
db | DBAdapter |
logger? | ILogger |
Returns
Overrides
Properties
| Property | Modifier | Type |
|---|---|---|
tableNames | public | Set<string> |
_subkeyMigrationKey | static | string |
Methods
_getClientId()
_getClientId(): Promise<string>
Returns
Promise<string>
control()
control(op, payload): Promise<string>
Invokes the powersync_control function for the sync client.
Parameters
| Parameter | Type |
|---|---|
op | PowerSyncControlCommand |
payload | null | string | ArrayBuffer | Uint8Array<ArrayBufferLike> |
Returns
Promise<string>
Implementation of
dispose()
dispose(): Promise<void>
Returns
Promise<void>
Implementation of
Overrides
getClientId()
getClientId(): Promise<string>
Get an unique client id.
Returns
Promise<string>
Implementation of
BucketStorageAdapter.getClientId
getCrudBatch()
getCrudBatch(limit?): Promise<null | CrudBatch>
Get a batch of objects to send to the server. When the objects are successfully sent to the server, call .complete()
Parameters
| Parameter | Type |
|---|---|
limit? | number |
Returns
Promise<null | CrudBatch>
Implementation of
BucketStorageAdapter.getCrudBatch
getMaxOpId()
getMaxOpId(): string
Returns
string
Implementation of
BucketStorageAdapter.getMaxOpId
hasCrud()
hasCrud(): Promise<boolean>
Returns
Promise<boolean>
Implementation of
hasMigratedSubkeys()
hasMigratedSubkeys(): Promise<boolean>
Returns
Promise<boolean>
Implementation of
BucketStorageAdapter.hasMigratedSubkeys
init()
init(): Promise<void>
Returns
Promise<void>
Implementation of
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
migrateToFixedSubkeys()
migrateToFixedSubkeys(): Promise<void>
Returns
Promise<void>
Implementation of
BucketStorageAdapter.migrateToFixedSubkeys
nextCrudItem()
nextCrudItem(): Promise<undefined | CrudEntry>
Returns
Promise<undefined | CrudEntry>
Implementation of
BucketStorageAdapter.nextCrudItem
registerListener()
registerListener(listener): () => void
Register a listener for updates to the PowerSync client.
Parameters
| Parameter | Type |
|---|---|
listener | Partial<BucketStorageListener> |
Returns
Function
Returns
void
Implementation of
BucketStorageAdapter.registerListener
Inherited from
updateLocalTarget()
updateLocalTarget(cb): Promise<boolean>
Parameters
| Parameter | Type |
|---|---|
cb | () => Promise<string> |
Returns
Promise<boolean>
Implementation of
BucketStorageAdapter.updateLocalTarget
writeTransaction()
writeTransaction<T>(callback, options?): Promise<T>
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
callback | (tx) => Promise<T> |
options? | { timeoutMs: number; } |
options.timeoutMs? | number |
Returns
Promise<T>