MySqlConnection class abstract

A connection to MySql or MariaDb database.

Use connect to open a new connection. You must call close when you are done.

Implemented types
Implementers

Constructors

MySqlConnection()

Properties

hashCode int
The hash code for this object.
no setterinherited
onDisconnect Future<void>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

begin() Future<Transaction>
Creates and returns a new transaction.
close() Future<void>
Closes the connection.
execute(String sql) StreamedFuture
Executes the given sql statement and returns the result.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepare(String sql) Future<Prepared>
inherited
prepared(String sql, Iterable values) Future<StreamedResults>
inherited
preparedWithAll(String sql, Iterable<Iterable> values) Stream<StreamedResults>
inherited
toString() String
A string representation of this object.
inherited
transaction(Future<void> work(Transaction transaction)) Future<void>
Functional way to execute a transaction. This method takes care of creating and releasing the transaction.

Operators

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

Static Methods

connect(ConnectionSettings c) Future<MySqlConnection>
Connects to a MySQL server at the given host on port, authenticates using user and password and connects to db.