* * @throws \Amp\Sql\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> * * @throws \Amp\Sql\TransactionError If the transaction has been committed or rolled back. */ public function rollback(): Promise; /** * Creates a savepoint with the given identifier. * * @param string $identifier Savepoint identifier. * * @return \Amp\Promise<\Amp\Sql\CommandResult> * * @throws \Amp\Sql\TransactionError If the transaction has been committed or rolled back. */ public function savepoint(string $identifier): Promise; /** * Rolls back to the savepoint with the given identifier. * * @param string $identifier Savepoint identifier. * * @return \Amp\Promise<\Amp\Sql\CommandResult> * * @throws \Amp\Sql\TransactionError If the transaction has been committed or rolled back. */ public function rollbackTo(string $identifier): Promise; /** * Releases the savepoint with the given identifier. * * @param string $identifier Savepoint identifier. * * @return \Amp\Promise<\Amp\Sql\CommandResult> * * @throws \Amp\Sql\TransactionError If the transaction has been committed or rolled back. */ public function release(string $identifier): Promise; }