Skip to main content

RNQSDBAdapter

Adapter for React Native Quick SQLite

Extends

Implements

Constructors

new RNQSDBAdapter()

new RNQSDBAdapter(baseDB, name): RNQSDBAdapter

Parameters

ParameterType
baseDBQuickSQLiteConnection
namestring

Returns

RNQSDBAdapter

Overrides

BaseObserver.constructor

Properties

PropertyModifierType
getpublic<T>(sql: string, parameters?: any[]) => Promise<T>
getAllpublic<T>(sql: string, parameters?: any[]) => Promise<T[]>
getOptionalpublic<T>(sql: string, parameters?: any[]) => Promise<null | T>
namepublicstring

Methods

close()

close(): void

Returns

void

Implementation of

DBAdapter.close


execute()

execute(query, params?): Promise<QueryResult>

Parameters

ParameterType
querystring
params?any[]

Returns

Promise<QueryResult>

Implementation of

DBAdapter.execute


executeBatch()

executeBatch(query, params): Promise<QueryResult>

Parameters

ParameterTypeDefault value
querystringundefined
paramsany[][][]

Returns

Promise<QueryResult>

Implementation of

DBAdapter.executeBatch


iterateAsyncListeners()

iterateAsyncListeners(cb): Promise<void>

Parameters

ParameterType
cb(listener) => Promise<any>

Returns

Promise<void>

Inherited from

BaseObserver.iterateAsyncListeners


iterateListeners()

iterateListeners(cb): void

Parameters

ParameterType
cb(listener) => any

Returns

void

Inherited from

BaseObserver.iterateListeners


readLock()

readLock<T>(fn, options?): Promise<T>

Type parameters

Type parameter
T

Parameters

ParameterType
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

ParameterType
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

ParameterType
listenerPartial<DBAdapterListener>

Returns

Function

Returns

void

Implementation of

DBAdapter.registerListener

Inherited from

BaseObserver.registerListener


writeLock()

writeLock<T>(fn, options?): Promise<T>

Type parameters

Type parameter
T

Parameters

ParameterType
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

ParameterType
fn(tx) => Promise<T>
options?DBLockOptions

Returns

Promise<T>

Implementation of

DBAdapter.writeTransaction