PoolConfig class
Configuration for the database connection pool.
Pass an instance to DbConfig.poolConfig to enable pooling with custom settings. All fields have sensible defaults.
Constructors
- PoolConfig({int maxConnections = 10, int minConnections = 2, Duration connectionTimeout = const Duration(seconds: 30), Duration idleTimeout = const Duration(minutes: 10)})
-
const
Properties
- connectionTimeout → Duration
-
How long to wait for a free connection before throwing
TimeoutException.final - hashCode → int
-
The hash code for this object.
no setterinherited
- idleTimeout → Duration
-
How long an idle connection is kept before being closed (MySQL only).
Set to Duration.zero to disable idle eviction.
final
- maxConnections → int
-
Maximum number of simultaneously open connections.
final
- minConnections → int
-
Minimum connections to keep alive (MySQL only; Postgres manages its own lifecycle).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited