classTableRenaming
final class TableRenaming
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.old TO new: one rename of RENAME TABLE.
The statement records the resolution of the old name, at the time the rename runs, as the relation fact of this node. Source: https://dev.mysql.com/doc/refman/8.4/en/rename-table.html.
$renaming = new \SqlSemantics\Platform\MySql\Statement\Alter\TableRenaming(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\QualifiedName(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('t')), new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\QualifiedName(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('t'), new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('archive')));
$renaming->to->schema?->value // => 'archive'Properties§
public QualifiedName $frompublic QualifiedName $toMethods§
public function __construct(public QualifiedName $from, public QualifiedName $to)Parameters
$from | QualifiedName | The current name with its optional database |
$to | QualifiedName | The new name with its optional database |
Calls 1
- static-call Check::input() line 36
public function render(Output $out): voidWrites the rename.
Parameters
$out | Output |
Calls 4
- method-call Output::keyword() line 46
- method-call Output::name() line 49
- class-const NameUse::Qualifier() line 49
- class-const NameUse::Relation() line 51
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
TableRenamingTestcalls