classRollback
final class Rollback
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.A request to roll back the current transaction.
Rule: PG-TRANSACTION-003. Mirrors PostgreSQL's TransactionStmt of kind TRANS_STMT_ROLLBACK with its chain flag. WORK or TRANSACTION after the command has no effect and is not kept. Facts: none; a transaction is the state of a session. Source: https://www.postgresql.org/docs/17/sql-rollback.html, https://www.postgresql.org/docs/17/sql-abort.html. Status: Implemented.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ABORT AND CHAIN');
[$operation->statement->chaining, $operation->toString()] // => [\SqlSemantics\Platform\PostgreSql\Statement\Utility\Transaction\Chaining::Chain, 'ABORT AND CHAIN']Properties§
public RollbackSpelling $spelling = RollbackSpelling::Rollbackpublic Chaining|null $chaining = nullMethods§
public function __construct(
public RollbackSpelling $spelling = RollbackSpelling::Rollback,
public Chaining|null $chaining = null,
)Parameters
$spelling | RollbackSpelling | The spelling of the command |
$chaining | Chaining|null | AND CHAIN or AND NO CHAIN, when written |
Calls 1
- class-const RollbackSpelling::Rollback() line 34
public function deriveStatement(Derivation $derivation): voidDerives nothing: a transaction is the state of a session.
Parameters
$derivation | Derivation |
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 50
- function-call
explodeline 52
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 1
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Utility\TransactionRule::statement() packages/sql-semantics-postgres/src/Lowering/Utility/TransactionRule.php:81
- new SqlSemantics\Platform\PostgreSql\Lowering\Utility\TransactionRule::statement() packages/sql-semantics-postgres/src/Lowering/Utility/TransactionRule.php:82