RawPreparedStatement extension type
Unsafe, raw access to a prepared statement.
CommonPreparedStatement automatically converts columns to Dart objects based on their columnType and uses high-level types like lists to represent parameters and results.
In some cases, it may be more efficient to call the underlying sqlite3_
methods directly. This class provides methods mapping directly to raw SQLite
C function calls, with no additional checks or implicit conversions.
Typically, this API would be used by:
- Calling
bindmethods to bind prepared statement parameters. - While step returns
true,- call columnType and other
columnmethods to read values.
- call columnType and other
- Call CommonPreparedStatement.reset or CommonPreparedStatement.close.
On the web, this can also be used to bind JavaScript BigInt values to
statements via WasmRawPreparedStatement.
None of these methods may be called after a statement is CommonPreparedStatement.closed. Unlike CommonPreparedStatement methods which validate that invariant, calling raw methods on finalized statements is an unchecked use-after-free.
- on
-
- StatementImplementation
- @experimental
Properties
- columnCount → int
-
Calls
sqlite3_column_count, returning the amount of columns of this prepared statement.no setter -
debugParameters
← List<
Object?> -
A list of parameters used in SqliteException.parametersToStatement for
exceptions thrown on this statement.
no getter
- supportsColumnTableName → bool
-
Whether the SQLite library supports extracting the table name information
out of a column.
no setter
Methods
-
bindBlob(
int index, List< int> value) → void -
Calls
sqlite3_bind_blob64with the 1-based index and the target value. -
bindDouble(
int index, double value) → void -
Calls
sqlite3_bind_doublewith the 1-based index and the target value. -
bindInt64(
int index, int value) → void -
Calls
sqlite3_bind_int64with the 1-based index and the target value. -
bindNull(
int index) → void -
Calls
sqlite3_bind_nullwith the 1-based index. -
bindText(
int index, String value) → void -
Calls
sqlite3_bind_textwith the 1-based index and the target value. -
columnBlob(
int index) → Uint8List -
Calls
sqlite3_column_blobwith the given index. -
columnDouble(
int index) → double -
Calls
sqlite3_column_doublewith the given index. -
columnInt64(
int index) → int -
Calls
sqlite3_column_int64with the given index. -
columnName(
int index) → String -
Calls
sqlite3_column_namewith the given index. -
columnTableName(
int index) → String? -
Calls
sqlite3_column_table_namewith the given index. -
columnText(
int index) → String -
Calls
sqlite3_column_textwith the given index. -
columnType(
int index) → SqlType -
Calls
sqlite3_column_type, returning the type of a column. -
step(
) → bool -
Calls
sqlite3_step.