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

26 lines
593 B
PHP
Raw Normal View History

2016-12-30 06:21:17 +01:00
<?php
2016-09-14 16:27:39 +02:00
namespace Amp\Postgres;
use AsyncInterop\Promise;
2016-09-14 16:27:39 +02:00
interface Connection extends Executor {
/**
* @param int $isolation
*
* @return \AsyncInterop\Promise<\Amp\Postgres\Transaction>
2016-09-14 16:27:39 +02:00
*
* @throws \Amp\Postgres\FailureException
*/
2016-11-15 18:06:21 +01:00
public function transaction(int $isolation = Transaction::COMMITTED): Promise;
2016-09-19 18:12:32 +02:00
/**
* @param string $channel Channel name.
*
* @return \AsyncInterop\Promise<\Amp\Postgres\Listener>
2016-09-19 18:12:32 +02:00
*
* @throws \Amp\Postgres\FailureException
*/
2016-11-15 18:06:21 +01:00
public function listen(string $channel): Promise;
2016-09-14 16:27:39 +02:00
}