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

Combines the two sides of a join into the columns and relations the join makes visible.

Rule: PG-JOIN-001. The columns of a side are the columns it shows to unqualified names. USING names columns that each side must have exactly once; NATURAL uses every column name both sides have. Each such column is merged into one column, first and in USING (or left) order, followed by the other columns of the left side and then of the right side. The merged column has the common type of the pair (PG-UNIFICATION-001) and is the left column for INNER and LEFT joins, the right column for RIGHT joins and the first non-NULL of both for FULL joins. A LEFT join can extend the right side with NULLs, a RIGHT join the left side, a FULL join both: the columns of an extended side can be NULL in the join and keep their declaration. The join itself is visible to unqualified names only; the relations inside stay visible to qualified names, and a USING alias names the merged columns, for qualified names only. A name a side does not have is reported only when the side is completely known. Source: https://www.postgresql.org/docs/17/queries-table-expressions.html#QUERIES-JOIN. Status: Implemented.

Methods§

public function names(
    Join $join,
    RowShape $left,
    RowShape $right,
    Derivation $derivation,
): list<Name>

Answers the names of the merged columns: the USING list, or the names both sides of a NATURAL join have.

Parameters

$joinJoin
$leftRowShape
$rightRowShape
$derivationDerivation

Returns

list<Name>
Called from 1
Calls 3
public function locate(
    RowShape $side,
    Name $name,
    Derivation $derivation,
    QueryMisuseRule $absent,
): ?int

Test cases 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 2

Relations§

Instantiated in 1
Method calls 1