1
0
mirror of https://github.com/danog/postgres.git synced 2024-11-27 04:24:45 +01:00
postgres/lib/Connection.php
2017-03-17 10:17:24 -05:00

26 lines
566 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;
}