RNQSDBAdapter
Adapter for React Native Quick SQLite
Extends
Implements
Constructors
new RNQSDBAdapter()
new RNQSDBAdapter(baseDB, name): RNQSDBAdapter
Parameters
Parameter | Type |
---|---|
baseDB | QuickSQLiteConnection |
name | string |
Returns
Overrides
Properties
Property | Modifier | Type |
---|---|---|
get | public | <T >(sql : string , parameters ?: any []) => Promise <T > |
getAll | public | <T >(sql : string , parameters ?: any []) => Promise <T []> |
getOptional | public | <T >(sql : string , parameters ?: any []) => Promise <null | T > |
name | public | string |
Methods
close()
close(): void
Returns
void
Implementation of
DBAdapter
.close
execute()
execute(query, params?): Promise<QueryResult>
Parameters
Parameter | Type |
---|---|
query | string |
params ? | any [] |
Returns
Promise
<QueryResult
>
Implementation of
DBAdapter
.execute
executeBatch()
executeBatch(query, params): Promise<QueryResult>
Parameters
Parameter | Type | Default value |
---|---|---|
query | string | undefined |
params | any [][] | [] |
Returns
Promise
<QueryResult
>
Implementation of
DBAdapter
.executeBatch
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
readLock()
readLock<T>(fn, options?): Promise<T>
Type parameters
Type parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
fn | (tx ) => Promise <T > |
options ? | DBLockOptions |
Returns
Promise
<T
>
Implementation of
DBAdapter
.readLock
readTransaction()
readTransaction<T>(fn, options?): Promise<T>
Type parameters
Type parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
fn | (tx ) => Promise <T > |
options ? | DBLockOptions |
Returns
Promise
<T
>
Implementation of
DBAdapter
.readTransaction
refreshSchema()
refreshSchema(): Promise<void>
Returns
Promise
<void
>
Implementation of
DBAdapter
.refreshSchema
registerListener()
registerListener(listener): () => void
Register a listener for updates to the PowerSync client.
Parameters
Parameter | Type |
---|---|
listener | Partial <DBAdapterListener > |
Returns
Function
Returns
void
Implementation of
Inherited from
writeLock()
writeLock<T>(fn, options?): Promise<T>
Type parameters
Type parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
fn | (tx ) => Promise <T > |
options ? | DBLockOptions |
Returns
Promise
<T
>
Implementation of
DBAdapter
.writeLock
writeTransaction()
writeTransaction<T>(fn, options?): Promise<T>
Type parameters
Type parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
fn | (tx ) => Promise <T > |
options ? | DBLockOptions |
Returns
Promise
<T
>
Implementation of
DBAdapter
.writeTransaction