mirror of
https://github.com/danog/postgres.git
synced 2024-12-15 02:47:33 +01:00
202caf8552
Cleaned up interfaces. Users can declare Executor or Link depending on their needs.
28 lines
572 B
PHP
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;
|
|
}
|