mirror of
https://github.com/danog/postgres.git
synced 2024-11-30 04:29:12 +01:00
parent
7cf9d37033
commit
b027714d02
@ -29,7 +29,7 @@ final class Pool extends ConnectionPool implements Link
|
|||||||
* @param ConnectionConfig $config
|
* @param ConnectionConfig $config
|
||||||
* @param int $maxConnections
|
* @param int $maxConnections
|
||||||
* @param int $idleTimeout
|
* @param int $idleTimeout
|
||||||
* @param bool $resetConnections True to automatically execute RESET ALL on a connection before use.
|
* @param bool $resetConnections True to automatically execute DISCARD ALL on a connection before use.
|
||||||
* @param Connector|null $connector
|
* @param Connector|null $connector
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
@ -80,7 +80,7 @@ final class Pool extends ConnectionPool implements Link
|
|||||||
\assert($connection instanceof Connection);
|
\assert($connection instanceof Connection);
|
||||||
|
|
||||||
if ($this->resetConnections) {
|
if ($this->resetConnections) {
|
||||||
yield $connection->query("RESET ALL");
|
yield $connection->query("DISCARD ALL");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $connection;
|
return $connection;
|
||||||
|
Loading…
Reference in New Issue
Block a user