interfaceTarget
interface Target
extends Node
Public API: explicitly declared with
@visibility public.One item of a select list or a RETURNING list: an expression with an optional name, or a star.
Mirrors PostgreSQL's ResTarget node. An item contributes one output field, or as many as its star expands to. Source: https://www.postgresql.org/docs/17/sql-select.html#SQL-SELECT-LIST.
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT 1 AS one');
$query->statement->targets[0]->alias->value // => 'one'Methods§
public function project(
Derivation $derivation,
Environment $environment,
int $position,
): list<Field|OpenStar>Derives the item and answers the output fields it contributes, numbered from a position.
Parameters
$derivation | Derivation | |
$environment | Environment | |
$position | int |
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§
Implemented by 2
Constant reads 7
- class-const SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Delete::__construct() packages/sql-semantics-postgres/src/Statement/Manipulation/Delete.php:58
- class-const SqlSemantics\Platform\PostgreSql\Statement\Manipulation\InsertDefaults::__construct() packages/sql-semantics-postgres/src/Statement/Manipulation/InsertDefaults.php:57
- class-const SqlSemantics\Platform\PostgreSql\Statement\Manipulation\InsertRows::__construct() packages/sql-semantics-postgres/src/Statement/Manipulation/InsertRows.php:73
- class-const SqlSemantics\Platform\PostgreSql\Statement\Manipulation\InsertSelect::__construct() packages/sql-semantics-postgres/src/Statement/Manipulation/InsertSelect.php:78
- class-const SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Merge::__construct() packages/sql-semantics-postgres/src/Statement/Manipulation/Merge.php:70
- class-const SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Update::__construct() packages/sql-semantics-postgres/src/Statement/Manipulation/Update.php:72
- class-const SqlSemantics\Platform\PostgreSql\Statement\Query\Select::__construct() packages/sql-semantics-postgres/src/Statement/Query/Select.php:93