NitroSQLite
React native nitro sqliteInterfaces

API Reference / react-native-nitro-sqlite / TypeOrmNitroSQLiteConnection

Interface: TypeOrmNitroSQLiteConnection

TypeScript

Source files: TypeScript

Callback-oriented connection returned to TypeORM.

Properties

attach

attach: (dbNameToAttach, alias, location, callback) => void

Defined in: typeORM.ts:30

Attach another database and invoke callback after it succeeds.

Parameters

dbNameToAttach

string

alias

string

location

string | undefined

callback

() => void

Returns

void


close

close: (okClose, failClose) => void

Defined in: typeORM.ts:28

Close the connection and report completion through callbacks.

Parameters

okClose

() => void

failClose

(e) => void

Returns

void


detach

detach: (alias, callback) => void

Defined in: typeORM.ts:37

Detach an attached database and invoke callback after it succeeds.

Parameters

alias

string

callback

() => void

Returns

void


executeSql

executeSql: <RowData>(sql, params, okExecute, failExecute) => Promise<void>

Defined in: typeORM.ts:19

Execute SQL asynchronously and report the result through a callback.

Type Parameters

RowData

RowData extends QueryResultRow = never

Parameters

sql

string

params

SQLiteQueryParams | undefined

okExecute

(res) => void

failExecute

(msg) => void

Returns

Promise<void>


transaction

transaction: (fn) => Promise<void>

Defined in: typeORM.ts:26

Run TypeORM work in a managed transaction.

Parameters

fn

(tx) => Promise<void>

Returns

Promise<void>