QueryExecutor class abstract

Anything that can execute a parameterised SQL statement.

Implemented by both DartApiDB (pooled connections) and DbTransaction (inside db.transaction(...)), so the fluent query builder works in both contexts:

final page = await db.query('users').paginate(page: 1);       // pooled
await db.transaction((tx) async {
  final user = await tx.query('users').where('id', equals: id).first();
  ...
});
Implementers
Available extensions

Constructors

QueryExecutor()

Properties

hashCode → int
The hash code for this object.
no setterinherited
paramStyle → DbParamStyle
The SQL parameter placeholder style used by this executor.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String table) → QueryBuilder

Available on QueryExecutor, provided by the DbQueryExtension extension

Returns a QueryBuilder targeting table.
rawQuery(String query, {Map<String, dynamic>? values}) → Future<DbResult>
Executes a raw SQL statement with optional named values.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited