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.

Renaming a tablespacedoctest
$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 $name
public Name $target

Methods§

public function __construct(public Name $name, public Name $target)

Parameters

$nameNameThe tablespace name
$targetNameThe new name
public function deriveStatement(Derivation $derivation): void

Has nothing to derive: a tablespace is no relation.

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