final class OfComposite
    implements AlterCommand
    uses Snapshot
Public API: explicitly declared with @visibility public.

OF type_name: makes the table a typed table of a composite type.

Mirrors AT_AddOf. Source: https://www.postgresql.org/docs/17/sql-altertable.html.

Making a table typeddoctest
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER TABLE t OF person');
    $statement->statement->commands[0]->type->last()->value // => 'person'

Properties§

public DottedName $type

Methods§

public function __construct(public DottedName $type)

Parameters

$typeDottedNameThe composite type
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives nothing: the type is a catalog name.

Parameters

$derivationDerivation
$environmentEnvironment
public function render(Output $out): void

Writes OF and the type.

Parameters

$outOutput
Calls 1

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
Type checks 1