classRenameTablespace
final class RenameTablespace
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.ALTER TABLESPACE name RENAME TO new_name: a request to rename a general tablespace (MySQL 8.0 and later).
Mirrors PT_alter_tablespace_rename (Sql_cmd_alter_tablespace_rename). Rule: MYSQL-RENAME-TABLESPACE-001. A tablespace is no relation, so the statement neither declares nor resolves one. Source: https://dev.mysql.com/doc/refman/8.4/en/alter-tablespace.html. Status: Implemented.
$rename = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('alter tablespace a rename to b');
[$rename->toString(), $rename->statement->target->value] // => ['ALTER TABLESPACE a RENAME TO b', 'b']Properties§
public Name $namepublic Name $targetMethods§
public function deriveStatement(Derivation $derivation): voidHas nothing to derive: a tablespace is no relation.
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
RenameTablespaceTestcalls