classRelationTarget
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.
$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 $relationMethods§
public function __construct(public RelationReference $relation)Parameters
$relation | RelationReference | The relation name and whether ONLY is written |
public function deriveClause(Derivation $derivation, Environment $environment): voidDerives nothing: a name holds no expression; the command resolves it.
Parameters
$derivation | Derivation | |
$environment | Environment |
Test cases 1
public function render(Output $out): voidTest 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
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Routine\ObjectForms::form() packages/sql-semantics-postgres/src/Rules/Routine/ObjectForms.php:99
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Routine\RelationTargets::resolve() packages/sql-semantics-postgres/src/Rules/Routine/RelationTargets.php:67
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::name() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:228
- instanceof SqlSemantics\Platform\PostgreSql\Statement\Object\Rename::deriveStatement() packages/sql-semantics-postgres/src/Statement/Object/Rename.php:81