PoolConfig
in package
Read onlyYes
FinalYes
Tags
Table of Contents
Properties
- $acquireTtl : Duration
- $borrowTimeout : Duration
- $healthCheckOnBorrow : bool
- $idleTtl : Duration
- $max : int
- $minIdle : int
- $resetQuery : string|null
- $validationQuery : string
Methods
- __construct() : mixed
Properties
$acquireTtl
public
Duration
$acquireTtl
$borrowTimeout
public
Duration
$borrowTimeout
$healthCheckOnBorrow
public
bool
$healthCheckOnBorrow
= false
$idleTtl
public
Duration
$idleTtl
$max
public
int
$max
= 16
$minIdle
public
int
$minIdle
= 2
$resetQuery
public
string|null
$resetQuery
= null
$validationQuery
public
string
$validationQuery
= 'SELECT 1'
Methods
__construct()
public
__construct([Duration|null $acquireTtl = null ][, Duration|null $borrowTimeout = null ][, bool $healthCheckOnBorrow = false ][, Duration|null $idleTtl = null ][, int $max = 16 ][, int $minIdle = 2 ][, string|null $resetQuery = null ][, string $validationQuery = 'SELECT 1' ]) : mixed
Parameters
- $acquireTtl : Duration|null = null
- $borrowTimeout : Duration|null = null
- $healthCheckOnBorrow : bool = false
- $idleTtl : Duration|null = null
- $max : int = 16
- $minIdle : int = 2
- $resetQuery : string|null = null
-
SQL run on every release to clear per-session state (roles, search_path, SET variables, temp tables, advisory locks) before the connection is reused. Dialect-specific — e.g.
DISCARD ALLorRESET ALLon PostgreSQL. An active transaction is always rolled back regardless of this setting. Leave null when a single trust domain shares the pool and no session state leaks. - $validationQuery : string = 'SELECT 1'