fix interfaces

This commit is contained in:
prolic 2018-06-29 17:41:04 +08:00
parent a36a41ab06
commit 92de8dc2a6
No known key found for this signature in database
GPG Key ID: 29722F9F48E9DE59
3 changed files with 13 additions and 12 deletions

View File

@ -5,7 +5,8 @@ namespace Amp\Sql;
use Amp\Iterator; use Amp\Iterator;
use Amp\Promise; use Amp\Promise;
interface ResultSet extends Iterator, Operation { interface ResultSet extends Iterator
{
const FETCH_ARRAY = 0; const FETCH_ARRAY = 0;
const FETCH_ASSOC = 1; const FETCH_ASSOC = 1;
const FETCH_OBJECT = 2; const FETCH_OBJECT = 2;

View File

@ -8,7 +8,7 @@ interface Statement {
/** /**
* @param mixed[] $params * @param mixed[] $params
* *
* @return \Amp\Promise<CommandResult|ResultSet> * @return Promise<CommandResult|ResultSet>
*/ */
public function execute(array $params = []): Promise; public function execute(array $params = []): Promise;

View File

@ -23,18 +23,18 @@ interface Transaction extends Executor, Operation {
/** /**
* Commits the transaction and makes it inactive. * 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; public function commit(): Promise;
/** /**
* Rolls back the transaction and makes it inactive. * 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; public function rollback(): Promise;
@ -43,9 +43,9 @@ interface Transaction extends Executor, Operation {
* *
* @param string $identifier Savepoint identifier. * @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; public function createSavepoint(string $identifier): Promise;
@ -54,9 +54,9 @@ interface Transaction extends Executor, Operation {
* *
* @param string $identifier Savepoint identifier. * @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; public function rollbackTo(string $identifier): Promise;
@ -65,9 +65,9 @@ interface Transaction extends Executor, Operation {
* *
* @param string $identifier Savepoint identifier. * @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; public function releaseSavepoint(string $identifier): Promise;
} }