PostgresDb constructor
PostgresDb({
- required String host,
- int port = 5432,
- required String databaseName,
- required String username,
- required String password,
- int timeoutInSeconds = 30,
- int queryTimeoutInSeconds = 30,
- String timeZone = 'UTC',
- bool useSSL = false,
- bool isUnixSocket = false,
- bool allowClearTextPassword = false,
- ReplicationMode replicationMode = ReplicationMode.none,
Implementation
PostgresDb({
required this.host,
this.port = 5432,
required this.databaseName,
required this.username,
required this.password,
int timeoutInSeconds = 30,
int queryTimeoutInSeconds = 30,
String timeZone = 'UTC',
bool useSSL = false,
bool isUnixSocket = false,
bool allowClearTextPassword = false,
ReplicationMode replicationMode = ReplicationMode.none,
}) {
db = PostgreSQLConnection(
host,
port,
databaseName,
username: username,
password: password,
timeoutInSeconds: timeoutInSeconds,
queryTimeoutInSeconds: queryTimeoutInSeconds,
timeZone: timeZone,
useSSL: useSSL,
isUnixSocket: isUnixSocket,
allowClearTextPassword: allowClearTextPassword,
replicationMode: replicationMode,
);
}