classRenamedMember
final class RenamedMember
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.The column, constraint or attribute ALTER ... RENAME renames: COLUMN a, CONSTRAINT c or ATTRIBUTE a.
Mirrors the subname of PostgreSQL's RenameStmt. The word COLUMN is optional and always written back. Source: https://www.postgresql.org/docs/17/sql-altertable.html.
$member = new \SqlSemantics\Platform\PostgreSql\Statement\Object\RenamedMember(\SqlSemantics\Platform\PostgreSql\Statement\Object\RenamedPart::Column, new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('a'));
[$member->part->value, $member->name->value] // => ['COLUMN', 'a']Properties§
public RenamedPart $partpublic Name $nameMethods§
public function __construct(public RenamedPart $part, public Name $name)Parameters
$part | RenamedPart | What kind of part is renamed |
$name | Name | The current name of the part |
public function render(Output $out): voidWrites the keyword and the current name.
Parameters
$out | Output |
Test cases 1
Calls 2
- method-call Output::keyword() line 42
- class-const NameUse::Column() line 42
Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.