DBMySQLAdapter constructor
DBMySQLAdapter(
- String databaseName,
- String username, {
- String? host = 'localhost',
- Object? password,
- PasswordProvider? passwordProvider,
- int? port = 3306,
- int minConnections = 1,
- int maxConnections = 3,
- bool generateTables = false,
- bool checkTables = true,
- Object? populateTables,
- Object? populateSource,
- Object? populateSourceVariables,
- EntityRepositoryProvider? parentRepositoryProvider,
- String? workingPath,
- bool logSQL = false,
Implementation
DBMySQLAdapter(this.databaseName, this.username,
{String? host = 'localhost',
Object? password,
PasswordProvider? passwordProvider,
int? port = 3306,
int minConnections = 1,
int maxConnections = 3,
super.generateTables,
super.checkTables,
super.populateTables,
super.populateSource,
super.populateSourceVariables,
super.parentRepositoryProvider,
super.workingPath,
super.logSQL})
: host = host ?? 'localhost',
port = port ?? 3306,
_password = (password != null && password is! PasswordProvider
? password.toString()
: null),
_passwordProvider = passwordProvider ??
(password is PasswordProvider ? password : null),
super(
'mysql',
minConnections,
maxConnections,
const DBSQLAdapterCapability(
dialect: SQLDialect(
'MySQL',
elementQuote: '`',
acceptsTemporaryTableForReturning: true,
acceptsInsertIgnore: true,
),
transactions: true,
transactionAbort: true,
tableSQL: true,
constraintSupport: false,
multiIsolateSupport: true),
) {
boot();
if (_password == null && _passwordProvider == null) {
throw ArgumentError("No `password` or `passwordProvider` ");
}
boot();
parentRepositoryProvider?.notifyKnownEntityRepositoryProvider(this);
}