interfaceTransactionTarget
interface TransactionTarget
Whatever a transaction statement is carried out against.
A statement read out of SQL says which of the six things it is, and carrying that out is someone else's work. Saying only that much here lets the statement stay something read out of text: it hands itself to a target without naming what keeps the transaction state, and without giving up the operation and savepoint name it holds.
Methods§
public function begin(): voidOpens a transaction.
Called from 1
public function commit(): voidKeeps everything the transaction wrote.
Called from 1
public function rollBack(): voidUndoes everything the transaction wrote.
Called from 1
public function savepoint(string $name): voidMarks a point the transaction can be brought back to.
Parameters
$name | string | Name the point is marked with |
Throws
InvalidDefinitionException When the statement named no savepointCalled from 1
public function rollBackTo(string $name): voidUndoes everything written since a point was marked.
Parameters
$name | string | Name the point was marked with |
Throws
InvalidDefinitionException When the statement named no savepoint, or nothing marked that pointCalled from 1
public function release(string $name): voidForgets a point, keeping everything written since it was marked.
Parameters
$name | string | Name the point was marked with |
Throws
InvalidDefinitionException When the statement named no savepoint, or nothing marked that pointCalled from 1
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Other tests reaching this symbol 1
Relations§
Implemented by 2
Method calls 6
- method-call ZtdQuery\Sql\TransactionStatement::apply() packages/ztd-query-core/src/Sql/TransactionStatement.php:97
- method-call ZtdQuery\Sql\TransactionStatement::apply() packages/ztd-query-core/src/Sql/TransactionStatement.php:98
- method-call ZtdQuery\Sql\TransactionStatement::apply() packages/ztd-query-core/src/Sql/TransactionStatement.php:99
- method-call ZtdQuery\Sql\TransactionStatement::apply() packages/ztd-query-core/src/Sql/TransactionStatement.php:100
- method-call ZtdQuery\Sql\TransactionStatement::apply() packages/ztd-query-core/src/Sql/TransactionStatement.php:101
- method-call ZtdQuery\Sql\TransactionStatement::apply() packages/ztd-query-core/src/Sql/TransactionStatement.php:102