open method
Future<bool>
open(
{ - Function? populateFunction,
- int timeoutInSeconds = 30,
- int queryTimeoutInSeconds = 30,
- String timeZone = 'UTC',
- bool useSSL = false,
- bool isUnixSocket = false,
- bool allowClearTextPassword = false,
})
Implementation
Future<bool> open({
Function? populateFunction,
int timeoutInSeconds = 30,
int queryTimeoutInSeconds = 30,
String timeZone = 'UTC',
bool useSSL = false,
bool isUnixSocket = false,
bool allowClearTextPassword = false,
}) async {
bool opened = await _postgresDb.open(
populateFunction: populateFunction,
timeoutInSeconds: timeoutInSeconds,
queryTimeoutInSeconds: queryTimeoutInSeconds,
timeZone: timeZone,
useSSL: useSSL,
isUnixSocket: isUnixSocket,
allowClearTextPassword: allowClearTextPassword,
);
if (!opened) {
return false;
}
var res = await _postgresDb.select("SELECT PostGIS_full_version();");
if (res == null) {
return false;
}
pgVersion = res.first.getAt(0);
return opened;
}