final class StarExpansion
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql". Code outside that scope must not name this declaration.

Expands the stars of a select list into output fields.

Rule: PG-STAR-001. * selects, in FROM order, every column a FROM item shows to unqualified names: the columns of a join with the merged USING and NATURAL columns once and first, and no column of a relation reachable by qualifier only. Without any FROM item it is reported. t.* selects every column of the relation the qualifier names, at the nearest query level that has one, including the columns merged by a join. A relation whose columns are not all known contributes its known columns and an open star naming the missing inputs. (value).* selects the fields of a composite value, which the context cannot describe: the shape is open on the inputs the value depends on, and a value of a known type that is not composite is reported. Every field refers to the slot it selects. Terminates: one pass over the relations of a level. Source: https://www.postgresql.org/docs/17/sql-select.html#SQL-SELECT-LIST, https://www.postgresql.org/docs/17/rowtypes.html#ROWTYPES-USAGE. Status: Implemented.

Methods§

public function qualified(
    Environment $environment,
    non-empty-list<Name> $qualifiers,
    int $position,
): list<Field|OpenStar>

Expands qualifier.* over the relation the qualifier names at the nearest level that has one.

Parameters

$environmentEnvironment
$qualifiersnon-empty-list<Name>
$positionint

Returns

Called from 1
Calls 5
public function composite(Derivation $derivation, ScalarFact $fact): list<Field|OpenStar>
public function expand(
    list<Field|OpenStar> $items,
    VisibleRelation $relation,
    bool $unqualified,
    int $position,
): list<Field|OpenStar>

Appends the slots of one relation, skipping hidden slots when the star is unqualified.

Parameters

$itemslist<Field|OpenStar>
$relationVisibleRelation
$unqualifiedbool
$positionint

Returns

Called from 2
Calls 6

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§

Instantiated in 4
Method calls 4