Database class abstract Introduction Database Repositories Migration
- Implemented types
Constructors
- Database({String? host, int? port, String? database, String? username, String? password, bool? useSSL, bool? isUnixSocket})
-
factory
- Database.withOneConnection({bool debugPrint, required Endpoint endpoint, ConnectionSettings? connectionSettings})
-
factory
- Database.withPool({bool debugPrint, required Pool pool})
-
factory
Properties
-
closed
→ Future<
void> -
A future that completes when isOpen turns false.
no setterinherited
- debugPrint ↔ bool
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isOpen → bool
-
Whether this connection is currently open.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> -
Closes this session, cleaning up resources and forbiding further calls to
prepare and execute.
inherited
-
execute(
Object query, {Object? parameters, bool ignoreRows = false, QueryMode? queryMode, Duration? timeout}) → Future< Result> -
Executes the
query
with the givenparameters
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
) → Future< void> -
prepare(
Object query) → Future< Statement> -
Prepares a reusable statement from a
query
.inherited -
run<
R> (Future< R> fn(Session session), {SessionSettings? settings}) → Future<R> -
Obtains a Session capable of running statements and calls
fn
with it.inherited -
runTx<
R> (Future< R> fn(TxSession session), {TransactionSettings? settings}) → Future<R> -
Obtains a Session running in a transaction and calls
fn
with it.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited