1
0
mirror of https://github.com/danog/postgres.git synced 2024-11-30 04:29:12 +01:00
postgres/lib/Connection.php
2017-05-15 23:28:37 -05:00

26 lines
562 B
PHP

<?php
namespace Amp\Postgres;
use Amp\Promise;
interface Connection extends Executor {
/**
* @param int $isolation
*
* @return \Amp\Promise<\Amp\Postgres\Transaction>
*
* @throws \Amp\Postgres\FailureException
*/
public function transaction(int $isolation = Transaction::COMMITTED): Promise;
/**
* @param string $channel Channel name.
*
* @return \Amp\Promise<\Amp\Postgres\Listener>
*
* @throws \Amp\Postgres\FailureException
*/
public function listen(string $channel): Promise;
}