Db class
- Implemented types
Constructors
- Db.fromEnv()
-
factory
- Db.fromSettings(ConnectionSettings settings)
-
factory
- Db.fromSettingsNoDatabase(ConnectionSettings settings)
-
Connects the mysql server without setting the default schema.
You can use this for actions like restoring a database.
factory
Properties
- connection → MySQLConnection
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ int
-
Unique id used in logging to identify which Db conection
was used to execute a query.
latefinaloverride-getter
- inTransaction ↔ bool
-
getter/setter pairoverride-getter
- logger → Logger
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settings ↔ ConnectionSettings
-
latefinal
Methods
-
close(
) → Future< void> -
override
-
connect(
) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query(
String query, [ValueList? values]) → Future< IResultSet> -
Query the db.
The query to be run with the passed
values
-
rollback(
) → Future< void> -
test(
) → Future< bool> -
Test if the instance is still valid.
This should test the connection is still up.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
transaction<
R> (Future< R> action()) → Future<R>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- mysqlDatabaseKey ↔ String
-
getter/setter pair
- mysqlHostKey ↔ String
-
getter/setter pair
- mysqlPortKey ↔ String
-
getter/setter pair
- queryCount ↔ int
-
getter/setter pair
Constants
- mysqlPasswordKey → const String
- mysqlUsernameKey → const String
- mysqlUseSSLKey → const String