A connection to a database server or file.
- Implemented types
- Implementers
Properties
- dialect → SqlDialect
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConnected → bool
-
no setter
- name → String
-
Connection name as configured (
sqlite,pgsql, ...).no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> -
connect(
) → Future< void> -
execute(
String sql, [List< Object?> bindings = const <Object?>[]]) → Future<int> -
Runs a statement and returns the number of affected rows.
inherited
-
insertGetId(
String sql, [List< Object?> bindings = const <Object?>[]]) → Future<Object?> -
Runs an insert and returns the generated primary key.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
select(
String sql, [List< Object?> bindings = const <Object?>[]]) → Future<List< Map< >String, Object?> > -
Runs a query and returns the rows as column → value maps.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
transaction<
T> (Future< T> body(QueryExecutor tx)) → Future<T> -
Runs
bodyinside a transaction; rolls back when it throws.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited