1
0
mirror of https://github.com/danog/postgres.git synced 2024-12-03 09:57:48 +01:00
postgres/lib/Statement.php

25 lines
546 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 Amp\Promise;
2016-09-14 16:27:39 +02:00
interface Statement {
2016-09-14 16:27:39 +02:00
/**
* @param mixed[] $params
2016-09-14 16:27:39 +02:00
*
* @return \Amp\Promise<\Amp\Postgres\CommandResult|\Amp\Postgres\TupleResult>
2016-09-14 16:27:39 +02:00
*/
public function execute(array $params = []): Promise;
2017-11-06 01:18:01 +01:00
/**
* @return bool True if the statement can still be executed, false if the connection has died.
*/
public function isAlive(): bool;
2017-11-06 01:18:01 +01:00
/**
* @return string The SQL string used to prepare the statement.
*/
public function getQuery(): string;
2016-09-14 16:27:39 +02:00
}