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

26 lines
593 B
PHP

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