DBPostgreSQLAdapter constructor
DBPostgreSQLAdapter(
- String databaseName,
- String username, {
- String? host = 'localhost',
- Object? password,
- PasswordProvider? passwordProvider,
- int? port = 5432,
- 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
DBPostgreSQLAdapter(this.databaseName, this.username,
{String? host = 'localhost',
Object? password,
PasswordProvider? passwordProvider,
int? port = 5432,
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 ?? 5432,
_password = (password != null && password is! PasswordProvider
? password.toString()
: null),
_passwordProvider = passwordProvider ??
(password is PasswordProvider ? password : null),
super(
'postgresql',
minConnections,
maxConnections,
const DBSQLAdapterCapability(
dialect: SQLDialect(
'PostgreSQL',
elementQuote: '"',
acceptsReturningSyntax: true,
acceptsInsertDefaultValues: true,
acceptsInsertOnConflict: true,
acceptsVarcharWithoutMaximumSize: true,
),
transactions: true,
transactionAbort: true,
tableSQL: true,
constraintSupport: true,
multiIsolateSupport: true),
) {
boot();
if (_password == null && _passwordProvider == null) {
throw ArgumentError("No `password` or `passwordProvider` ");
}
parentRepositoryProvider?.notifyKnownEntityRepositoryProvider(this);
}