Executes typed SQLx-style queries against a database connection, transaction, or driver.
Generated DAO code receives a DatabaseExecutor and calls fetchOptional,
fetchAll, fetchOne, fetchScalar, or execute depending on the
annotated method return type.
- Implementers
Properties
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