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.

Reading the alias of a select-list itemdoctest
$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

$derivationDerivation
$environmentEnvironment
$positionint

Returns

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