PostgreSQLPoolSettings class

Configuração de um PostgreSQLPool.

Constructors

PostgreSQLPoolSettings({int maxConnectionCount = 10, Duration? maxConnectionAge = const Duration(hours: 12), Duration? maxSessionUse = const Duration(hours: 8), int? maxErrorCount = 128, int? maxUseCount, Duration? idleTestThreshold = const Duration(minutes: 1), Duration? acquireTimeout, Future<void> onOpen(PostgreSQLConnection connection)?, PgRetryOptions? retryOptions})
const

Properties

acquireTimeout → Duration?
Espera máxima por uma conexão livre; ao expirar, a sessão falha com TimeoutException (null = espera sem limite).
final
hashCode → int
The hash code for this object.
no setterinherited
idleTestThreshold → Duration?
Uma conexão ociosa por mais tempo que isso é testada (SELECT 1) antes de ser entregue a uma sessão; se falhar, é fechada e outra é usada (null = nunca testa).
final
maxConnectionAge → Duration?
Conexões abertas há mais tempo que isso são fechadas ao serem devolvidas (null = sem limite).
final
maxConnectionCount → int
Número máximo de conexões abertas ao mesmo tempo.
final
maxErrorCount → int?
Conexões cujas sessões falharam esse número de vezes são fechadas ao serem devolvidas (null = sem limite).
final
maxSessionUse → Duration?
Conexões usadas por mais tempo que isso (somando as sessões) são fechadas ao serem devolvidas (null = sem limite).
final
maxUseCount → int?
Conexões usadas por esse número de sessões são fechadas ao serem devolvidas (null = sem limite).
final
onOpen → Future<void> Function(PostgreSQLConnection connection)?
Chamado depois de abrir cada conexão (por exemplo, para executar SET). Se falhar, a conexão é fechada e a sessão falha com o erro.
final
retryOptions → PgRetryOptions?
Novas tentativas padrão de PostgreSQLPool.run, PostgreSQLPool.runTx e PostgreSQLPool.withConnection (null = sem novas tentativas).
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