fix interfaces
This commit is contained in:
parent
a36a41ab06
commit
92de8dc2a6
@ -5,7 +5,8 @@ namespace Amp\Sql;
|
||||
use Amp\Iterator;
|
||||
use Amp\Promise;
|
||||
|
||||
interface ResultSet extends Iterator, Operation {
|
||||
interface ResultSet extends Iterator
|
||||
{
|
||||
const FETCH_ARRAY = 0;
|
||||
const FETCH_ASSOC = 1;
|
||||
const FETCH_OBJECT = 2;
|
||||
|
@ -8,7 +8,7 @@ interface Statement {
|
||||
/**
|
||||
* @param mixed[] $params
|
||||
*
|
||||
* @return \Amp\Promise<CommandResult|ResultSet>
|
||||
* @return Promise<CommandResult|ResultSet>
|
||||
*/
|
||||
public function execute(array $params = []): Promise;
|
||||
|
||||
|
@ -23,18 +23,18 @@ interface Transaction extends Executor, Operation {
|
||||
/**
|
||||
* Commits the transaction and makes it inactive.
|
||||
*
|
||||
* @return \Amp\Promise<\Amp\Sql\CommandResult>
|
||||
* @return Promise<CommandResult>
|
||||
*
|
||||
* @throws \Amp\Sql\TransactionError If the transaction has been committed or rolled back.
|
||||
* @throws TransactionError If the transaction has been committed or rolled back.
|
||||
*/
|
||||
public function commit(): Promise;
|
||||
|
||||
/**
|
||||
* Rolls back the transaction and makes it inactive.
|
||||
*
|
||||
* @return \Amp\Promise<\Amp\Sql\CommandResult>
|
||||
* @return Promise<CommandResult>
|
||||
*
|
||||
* @throws \Amp\Sql\TransactionError If the transaction has been committed or rolled back.
|
||||
* @throws TransactionError If the transaction has been committed or rolled back.
|
||||
*/
|
||||
public function rollback(): Promise;
|
||||
|
||||
@ -43,9 +43,9 @@ interface Transaction extends Executor, Operation {
|
||||
*
|
||||
* @param string $identifier Savepoint identifier.
|
||||
*
|
||||
* @return \Amp\Promise<\Amp\Sql\CommandResult>
|
||||
* @return Promise<CommandResult>
|
||||
*
|
||||
* @throws \Amp\Sql\TransactionError If the transaction has been committed or rolled back.
|
||||
* @throws TransactionError If the transaction has been committed or rolled back.
|
||||
*/
|
||||
public function createSavepoint(string $identifier): Promise;
|
||||
|
||||
@ -54,9 +54,9 @@ interface Transaction extends Executor, Operation {
|
||||
*
|
||||
* @param string $identifier Savepoint identifier.
|
||||
*
|
||||
* @return \Amp\Promise<\Amp\Sql\CommandResult>
|
||||
* @return Promise<CommandResult>
|
||||
*
|
||||
* @throws \Amp\Sql\TransactionError If the transaction has been committed or rolled back.
|
||||
* @throws TransactionError If the transaction has been committed or rolled back.
|
||||
*/
|
||||
public function rollbackTo(string $identifier): Promise;
|
||||
|
||||
@ -65,9 +65,9 @@ interface Transaction extends Executor, Operation {
|
||||
*
|
||||
* @param string $identifier Savepoint identifier.
|
||||
*
|
||||
* @return \Amp\Promise<\Amp\Sql\CommandResult>
|
||||
* @return Promise<CommandResult>
|
||||
*
|
||||
* @throws \Amp\Sql\TransactionError If the transaction has been committed or rolled back.
|
||||
* @throws TransactionError If the transaction has been committed or rolled back.
|
||||
*/
|
||||
public function releaseSavepoint(string $identifier): Promise;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user