Executes typed SQLx-style queries against a database pool, connection, transaction, or driver.
This mirrors sqlx's Executor role: generated DAO code receives an
executor and calls fetchOptional, fetchAll, fetchOne, fetchScalar,
or execute depending on the annotated method return shape.
- Implementers
Properties
- driver → Driver
-
Database driver used by this SQLx driver.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- raw → RawSql
-
Explicit unchecked SQL access for dynamic/admin queries.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< Result< Unit, SqlxError> > - Closes resources owned by this driver.
-
execute(
String sql, List< Object?> parameters) → Future<Result< ExecResult, SqlxError> > - Runs a checked statement and returns execution metadata.
-
fetchAll<
T> (String sql, List< Object?> parameters, RowMapper<T> mapper) → Future<Result< List< >T> , SqlxError> - Runs a checked row query that returns all rows.
-
fetchOne<
T> (String sql, List< Object?> parameters, RowMapper<T> mapper) → Future<Result< T, SqlxError> > - Runs a checked row query that must return exactly one row.
-
fetchOptional<
T> (String sql, List< Object?> parameters, RowMapper<T> mapper) → Future<Result< T?, SqlxError> > - Runs a checked row query that returns zero or one row.
-
fetchScalar<
T> (String sql, List< Object?> parameters) → Future<Result< T, SqlxError> > - Runs a checked scalar query and reads column index zero.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
transaction<
T> (Future< Result< fn(Executor tx)) → Future<T, SqlxError> >Result< T, SqlxError> > -
Runs
fninside a database transaction.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited