1
0
mirror of https://github.com/danog/postgres.git synced 2025-01-22 21:31:16 +01:00
postgres/lib/Connection.php

26 lines
633 B
PHP
Raw Normal View History

2016-09-14 09:27:39 -05:00
<?php declare(strict_types = 1);
namespace Amp\Postgres;
use Interop\Async\Awaitable;
interface Connection extends Executor {
/**
* @param int $isolation
*
* @return \Interop\Async\Awaitable<\Amp\Postgres\Transaction>
*
* @throws \Amp\Postgres\FailureException
*/
public function transaction(int $isolation = Transaction::COMMITTED): Awaitable;
2016-09-19 11:12:32 -05:00
/**
* @param string $channel Channel name.
*
* @return \Interop\Async\Awaitable<\Amp\Postgres\Listener>
*
* @throws \Amp\Postgres\FailureException
*/
public function listen(string $channel): Awaitable;
2016-09-14 09:27:39 -05:00
}