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

A request to rename a table.

Rule: SQLITE-ALTER-RENAME-TABLE-001. The resolution of the table is the relation fact of the statement node; a missing or conflicting table and a view (SQLITE-RELATION-KIND-001) are diagnostics. The new name is unqualified: the table stays in its schema. The statement changes no declaration and provides none. Source: https://sqlite.org/lang_altertable.html#alter_table_rename. Status: Implemented.

Reading a table renamedoctest
$alter = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('ALTER TABLE main.t RENAME TO u');
    [$alter->statement->table->name->value, $alter->statement->newName->value, $alter->declarations()] // => ['t', 'u', []]

Properties§

public QualifiedName $table
public Name $newName

Methods§

public function __construct(public QualifiedName $table, public Name $newName)

Parameters

$tableQualifiedNameThe table to rename
$newNameNameThe new table name
Calls 1
public function deriveStatement(Derivation $derivation): void

Records the resolution of the table.

Parameters

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

Writes the request.

Parameters

$outOutput
Calls 4

Test cases 2§

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

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1