MySqlConnection class

Represents a connection to the database. Use connect to open a connection. You must call close when you are done.

Constructors

MySqlConnection(Duration _timeout, ReqRespConnection _conn)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future
Close the connection
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String sql, [List<Object?>? values]) Future<Results>
Run sql query on the database using values as positional sql parameters.
queryMulti(String sql, Iterable<List<Object?>> values) Future<List<Results>>
Run sql query multiple times for each set of positional sql parameters in values.
toString() String
A string representation of this object.
inherited
transaction(Function queryBlock) Future

Operators

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

Static Methods

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