1
0
mirror of https://github.com/danog/postgres.git synced 2024-12-15 02:47:33 +01:00
postgres/lib/Pool.php
Aaron Piotrowski 202caf8552
Add Link interface; make PooledConnection internal
Cleaned up interfaces. Users can declare Executor or Link depending on their needs.
2017-08-01 23:01:55 -05:00

28 lines
572 B
PHP

<?php
namespace Amp\Postgres;
use Amp\Promise;
interface Pool extends Link {
/**
* @return \Amp\Promise<\Amp\Postgres\Connection>
*/
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;
}