final class RelationTarget
    implements ObjectReference
    uses Snapshot
Public API: explicitly declared with @visibility public.

A relation named by an ALTER command, with or without its inheritance descendants.

ALTER TABLE and ALTER FOREIGN TABLE write a relation that may be limited with ONLY; ALTER SEQUENCE, VIEW, MATERIALIZED VIEW and INDEX write a plain relation name. The command resolves the name as a relation. Source: https://www.postgresql.org/docs/17/sql-altertable.html.

Reading the relation namedoctest
$target = new \SqlSemantics\Platform\PostgreSql\Statement\Object\Reference\RelationTarget(new \SqlSemantics\Platform\PostgreSql\Statement\Name\RelationReference(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\QualifiedName(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('orders'))));
    $target->relation->name->name->value // => 'orders'

Properties§

public RelationReference $relation

Methods§

public function __construct(public RelationReference $relation)

Parameters

$relationRelationReferenceThe relation name and whether ONLY is written
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives nothing: a name holds no expression; the command resolves it.

Parameters

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

Writes the relation.

Parameters

$outOutput
Test cases 1
Calls 1

Test cases 6§

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

Dedicated tests 2
Other tests reaching this symbol 4

Relations§

Instantiated in 2
Type checks 4