1
0
mirror of https://github.com/danog/postgres.git synced 2024-12-15 19:07:26 +01:00
postgres/lib/Executor.php

36 lines
809 B
PHP
Raw Normal View History

2016-09-14 16:27:39 +02:00
<?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;
}