Pool constructor

Pool(
  1. String databaseUri, {
  2. String? poolName,
  3. int? minConnections,
  4. int? maxConnections,
  5. int? limitConnections,
  6. dynamic onOpen(
    1. Connection connection
    )?,
  7. void onMaxConnection(
    1. int count
    )?,
  8. QueryCallback? onExecute,
  9. QueryCallback? onQuery,
  10. Duration? startTimeout,
  11. Duration? stopTimeout,
  12. Duration? establishTimeout,
  13. Duration? connectionTimeout,
  14. Duration? idleTimeout,
  15. Duration? limitTimeout,
  16. Duration? maxLifetime,
  17. Duration? leakDetectionThreshold,
  18. bool? testConnections,
  19. bool? restartIfAllConnectionsLeaked,
  20. String? applicationName,
  21. String? timeZone,
  22. 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);