classTargets
final class Targets
Derives the table a data-modifying statement or COPY names.
Rule: PG-TARGET-TABLE-001. The name denotes a relation found along the schema search path; a common table expression of the same name is never the target. The row shape follows PG-TABLE-SHAPE-001. The table is one visible relation under its correlation name, or under its table name when it has none; with a correlation name, the table name no longer qualifies its columns. Source: https://www.postgresql.org/docs/17/sql-update.html, https://www.postgresql.org/docs/17/queries-with.html#QUERIES-WITH-MODIFYING. Status: Implemented.
Methods§
public function fact(TargetTable $target, Derivation $derivation): RelationFactResolves the table among the declared relations and derives its row shape.
Parameters
$target | TargetTable | |
$derivation | Derivation |
Returns
Called from 1
Calls 4
- method-call TableShapes::input() line 35
- new TableShapes line 35
- new TableInput line 35
- method-call Derivation::environment() line 35
public function visible(TargetTable $target, RelationFact $fact): VisibleRelationAnswers the table as the relation the clauses of the statement see.
Parameters
$target | TargetTable | |
$fact | RelationFact |
Returns
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Rules\Manipulation\CopyFacts::table() packages/sql-semantics-postgres/src/Rules/Manipulation/CopyFacts.php:55
- method-call SqlSemantics\Platform\PostgreSql\Rules\Manipulation\ModificationScope::open() packages/sql-semantics-postgres/src/Rules/Manipulation/ModificationScope.php:53
Calls 3
- new VisibleRelation line 43
- method-call TableShapes::implicit() line 43
- new TableShapes line 43
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
TargetsTestcalls
Relations§
Instantiated in 3
- new SqlSemantics\Platform\PostgreSql\Rules\Manipulation\CopyFacts::table() packages/sql-semantics-postgres/src/Rules/Manipulation/CopyFacts.php:55
- new SqlSemantics\Platform\PostgreSql\Rules\Manipulation\ModificationScope::open() packages/sql-semantics-postgres/src/Rules/Manipulation/ModificationScope.php:53
- new SqlSemantics\Platform\PostgreSql\Statement\Manipulation\TargetTable::deriveRelation() packages/sql-semantics-postgres/src/Statement/Manipulation/TargetTable.php:65
Method calls 3
- method-call SqlSemantics\Platform\PostgreSql\Rules\Manipulation\CopyFacts::table() packages/sql-semantics-postgres/src/Rules/Manipulation/CopyFacts.php:55
- method-call SqlSemantics\Platform\PostgreSql\Rules\Manipulation\ModificationScope::open() packages/sql-semantics-postgres/src/Rules/Manipulation/ModificationScope.php:53
- method-call SqlSemantics\Platform\PostgreSql\Statement\Manipulation\TargetTable::deriveRelation() packages/sql-semantics-postgres/src/Statement/Manipulation/TargetTable.php:65