1
0
mirror of https://github.com/danog/postgres.git synced 2024-11-30 04:29:12 +01:00
postgres/lib/Pool.php
Aaron Piotrowski 2f0017c7a4
Add Handle interface and Pool::getConnection()
Adds quoteString() and quoteName() methods. Pool::getConnection() returns a promise that resolves to an instance of PooledConnection.
2017-08-01 00:38:12 -05:00

28 lines
584 B
PHP

<?php
namespace Amp\Postgres;
use Amp\Promise;
interface Pool extends Connection {
/**
* @return \Amp\Promise<\Amp\Postgres\PooledConnection>
*/
public function getConnection(): Promise;
/**
* @return int Current number of connections in the pool.
*/
public function getConnectionCount(): int;
/**
* @return int Current number of idle connections in the pool.
*/
public function getIdleConnectionCount(): int;
/**
* @return int Maximum number of connections.
*/
public function getMaxConnections(): int;
}