1
0
mirror of https://github.com/danog/postgres.git synced 2024-12-15 19:07:26 +01:00
postgres/lib/Executor.php
Aaron Piotrowski caf829a48c Initial commit
2016-09-14 09:27:39 -05:00

36 lines
809 B
PHP

<?php declare(strict_types = 1);
namespace Amp\Postgres;
use Interop\Async\Awaitable;
interface Executor {
/**
* @param string $sql
*
* @return \Interop\Async\Awaitable<\Amp\Postgres\Result>
*
* @throws \Amp\Postgres\FailureException
*/
public function query(string $sql): Awaitable;
/**
* @param string $sql
* @param mixed ...$params
*
* @return \Interop\Async\Awaitable<\Amp\Postgres\Result>
*
* @throws \Amp\Postgres\FailureException
*/
public function execute(string $sql, ...$params): Awaitable;
/**
* @param string $sql
*
* @return \Interop\Async\Awaitable<\Amp\Postgres\Statement>
*
* @throws \Amp\Postgres\FailureException
*/
public function prepare(string $sql): Awaitable;
}