WASqliteConnection
Internal
WA-SQLite connection which directly interfaces with WA-SQLite. This is usually instantiated inside a worker.
Extends
Implements
Constructors
new WASqliteConnection()
new WASqliteConnection(options): WASqliteConnection
Parameters
| Parameter | Type |
|---|---|
options | ResolvedWASQLiteOpenFactoryOptions |
Returns
Overrides
Methods
close()
close(): Promise<void>
Returns
Promise<void>
Implementation of
dispose()
dispose(): void
Returns
void
Inherited from
execute()
execute(sql, bindings?): Promise<ProxiedQueryResult>
This executes single SQL statements inside a requested lock.
Parameters
| Parameter | Type |
|---|---|
sql | string | TemplateStringsArray |
bindings? | any[] |
Returns
Promise<ProxiedQueryResult>
Implementation of
AsyncDatabaseConnection.execute
executeBatch()
executeBatch(sql, bindings?): Promise<ProxiedQueryResult>
This executes SQL statements in a batch.
Parameters
| Parameter | Type |
|---|---|
sql | string |
bindings? | any[][] |
Returns
Promise<ProxiedQueryResult>
Implementation of
AsyncDatabaseConnection.executeBatch
executeRaw()
executeRaw(sql, bindings?): Promise<any[][]>
Parameters
| Parameter | Type |
|---|---|
sql | string | TemplateStringsArray |
bindings? | any[] |
Returns
Promise<any[][]>
Implementation of
AsyncDatabaseConnection.executeRaw
fireUpdates()
fireUpdates(shouldBroadcast): void
Parameters
| Parameter | Type | Default value |
|---|---|---|
shouldBroadcast | boolean | true |
Returns
void
getConfig()
getConfig(): Promise<ResolvedWASQLiteOpenFactoryOptions>
Returns
Promise<ResolvedWASQLiteOpenFactoryOptions>
Implementation of
AsyncDatabaseConnection.getConfig
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
registerListener()
registerListener(listener): () => void
Register a listener for updates to the PowerSync client.
Parameters
| Parameter | Type |
|---|---|
listener | Partial<WASQLiteConnectionListener> |
Returns
Function
Returns
void
Inherited from
registerOnTableChange()
registerOnTableChange(callback): Promise<() => void>
Parameters
| Parameter | Type |
|---|---|
callback | OnTableChangeCallback |
Returns
Promise<() => void>