MySql
Note: this is not as yet a released feature.
  1. 1.
    example:
1
aqueduct db upgrade --connect mysql://username:[email protected]:port/databaseName
Copied!
or setting database.yaml:
1
schema: postgres|mysql
2
host: host
3
port: port
4
username: username
5
password: password
6
databaseName: databaseName
Copied!
  1. 1.
    MySqlPersistentStore:
1
final MySqlPersistentStore persistentStore = MySqlPersistentStore(
2
_config.database.username,
3
_config.database.password,
4
_config.database.host,
5
_config.database.port,
6
_config.database.databaseName);
7
8
context = ManagedContext(dataModel, persistentStore);
9
10
/// ......
11
final query = Query<User>(context,values: user)
12
..where((o) => o.username).equalTo(user.username);
13
14
final res = await query.delete();
15
/// ......
Copied!
  1. 1.
    Support setting field size
1
class _User extends ResourceOwnerTableDefinition {
2
@Column(size: 11)
3
String mobile;
4
5
@override
6
@Column(unique: true, indexed: true, size: 20)
7
String username;
8
}
Copied!
Copy link