mirror of
https://github.com/danog/postgres.git
synced 2024-11-27 04:24:45 +01:00
202caf8552
Cleaned up interfaces. Users can declare Executor or Link depending on their needs.
26 lines
556 B
PHP
26 lines
556 B
PHP
<?php
|
|
|
|
namespace Amp\Postgres;
|
|
|
|
use Amp\Promise;
|
|
|
|
interface Link 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;
|
|
}
|