mirror of
https://github.com/danog/postgres.git
synced 2024-11-30 04:29:12 +01:00
2f0017c7a4
Adds quoteString() and quoteName() methods. Pool::getConnection() returns a promise that resolves to an instance of PooledConnection.
28 lines
584 B
PHP
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;
|
|
}
|