NitroSQLite
react-native-nitro-sqliteHybrid Objects

NitroSQLitePreparedStatement

TypeScriptC++

Source files: TypeScript · C++

Native prepared statement returned by NitroSQLite.native.prepare().

Extends

  • HybridObject<{ android: "c++"; ios: "c++"; }>

Properties

isFinalized

readonly isFinalized: boolean

Defined in: specs/NitroSQLitePreparedStatement.nitro.ts:15

Whether the native statement has been finalized.

Methods

execute()

execute(params?): NitroSQLiteQueryResult

Defined in: specs/NitroSQLitePreparedStatement.nitro.ts:22

Execute on the calling thread, replacing the previous parameter bindings. Throws after finalization or connection closure.

Parameters

params?

SQLiteQueryParams

Values bound to positional placeholders.

Returns

NitroSQLiteQueryResult

Native query rows, affected row count, insert ID, and metadata.


executeAsync()

executeAsync(params?): Promise<NitroSQLiteQueryResult>

Defined in: specs/NitroSQLitePreparedStatement.nitro.ts:28

Execute on a background thread, replacing the previous parameter bindings. Rejects after finalization or connection closure.

Parameters

params?

SQLiteQueryParams

Values bound to positional placeholders.

Returns

Promise<NitroSQLiteQueryResult>

A promise of the native query result.


executeRaw()

executeRaw(params?): NitroSQLiteRawQueryResult

Defined in: specs/NitroSQLitePreparedStatement.nitro.ts:33

Execute on the calling thread like execute, returning rows as arrays of column values.

Parameters

params?

SQLiteQueryParams

Values bound to positional placeholders.

Returns

NitroSQLiteRawQueryResult

Column names, rows as value arrays, affected row count, and insert ID.


executeRawAsync()

executeRawAsync(params?): Promise<NitroSQLiteRawQueryResult>

Defined in: specs/NitroSQLitePreparedStatement.nitro.ts:38

Execute on a background thread like executeAsync, returning rows as arrays of column values.

Parameters

params?

SQLiteQueryParams

Values bound to positional placeholders.

Returns

Promise<NitroSQLiteRawQueryResult>

A promise of the native raw query result.


finalize()

finalize(): void

Defined in: specs/NitroSQLitePreparedStatement.nitro.ts:42

Release the native statement. Repeated calls are safe.

Returns

void

On this page