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.

Reading a chained end of a transactiondoctest
$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::Rollback
public Chaining|null $chaining = null

Methods§

public function __construct(
    public RollbackSpelling $spelling = RollbackSpelling::Rollback,
    public Chaining|null $chaining = null,
)

Parameters

$spellingRollbackSpellingThe spelling of the command
$chainingChaining|nullAND CHAIN or AND NO CHAIN, when written
Calls 1
public function deriveStatement(Derivation $derivation): void

Derives nothing: a transaction is the state of a session.

Parameters

$derivationDerivation
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 2

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