Pool constructor
Pool(
- String databaseUri, {
- String? poolName,
- int? minConnections,
- int? maxConnections,
- int? limitConnections,
- dynamic onOpen(
- Connection connection
- void onMaxConnection(
- int count
- QueryCallback? onExecute,
- QueryCallback? onQuery,
- Duration? startTimeout,
- Duration? stopTimeout,
- Duration? establishTimeout,
- Duration? connectionTimeout,
- Duration? idleTimeout,
- Duration? limitTimeout,
- Duration? maxLifetime,
- Duration? leakDetectionThreshold,
- bool? testConnections,
- bool? restartIfAllConnectionsLeaked,
- String? applicationName,
- String? timeZone,
- TypeConverter? typeConverter,
See PoolSettings for a description of settings.
Implementation
factory Pool(String databaseUri,
{String? poolName,
int? minConnections,
int? maxConnections,
int? limitConnections,
dynamic Function(pg.Connection connection)? onOpen,
void Function(int count)? onMaxConnection,
QueryCallback? onExecute,
QueryCallback? onQuery,
Duration? startTimeout,
Duration? stopTimeout,
Duration? establishTimeout,
Duration? connectionTimeout,
Duration? idleTimeout,
Duration? limitTimeout,
Duration? maxLifetime,
Duration? leakDetectionThreshold,
bool? testConnections,
bool? restartIfAllConnectionsLeaked,
String? applicationName,
String? timeZone,
pg.TypeConverter? typeConverter})
=> PoolImpl(PoolSettingsImpl.withDefaults(
databaseUri: databaseUri,
poolName: poolName,
minConnections: minConnections,
maxConnections: maxConnections,
limitConnections: limitConnections,
onOpen: onOpen,
onMaxConnection: onMaxConnection,
onExecute: onExecute,
onQuery: onQuery,
startTimeout: startTimeout,
stopTimeout: stopTimeout,
establishTimeout: establishTimeout,
connectionTimeout: connectionTimeout,
idleTimeout: idleTimeout,
limitTimeout: limitTimeout,
maxLifetime: maxLifetime,
leakDetectionThreshold: leakDetectionThreshold,
testConnections: testConnections,
restartIfAllConnectionsLeaked: restartIfAllConnectionsLeaked,
applicationName: applicationName,
timeZone: timeZone),
typeConverter);