classRollbackToSavepoint
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.
$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 $savepointMethods§
public function deriveStatement(Derivation $derivation): voidHas nothing to derive: the request names no relation and no value.
Parameters
$derivation | Derivation |
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 52
- class-const NameUse::Identifier() line 52
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
RollbackToSavepointTestcalls