final class RollbackToSavepoint
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

ROLLBACK [WORK] TO [SAVEPOINT] name: a request to undo the changes made after a savepoint.

Mirrors SQLCOM_ROLLBACK_TO_SAVEPOINT. Rule: MYSQL-ROLLBACK-TO-SAVEPOINT-001. The savepoint is a name of the session's current transaction, which no declaration context holds; the server compares savepoint names case-insensitively. WORK and the word SAVEPOINT are optional; WORK is not written. The statement names no relation and has no facts. Source: https://dev.mysql.com/doc/refman/8.4/en/savepoint.html. Status: Implemented.

Naming the savepointdoctest
$statement = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('rollback work to sp1');
    [$statement->toString(), $statement->statement->savepoint->value] // => ['ROLLBACK TO SAVEPOINT sp1', 'sp1']

Properties§

public Name $savepoint

Methods§

public function __construct(public Name $savepoint)

Parameters

$savepointNameThe savepoint name
public function deriveStatement(Derivation $derivation): void

Has nothing to derive: the request names no relation and no value.

Parameters

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

Writes the request.

Parameters

$outOutput
Calls 2

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 1
Type declarations 1