final class RelationList
    implements Relation
    uses Snapshot
Public API: explicitly declared with @visibility public.

Several FROM items separated by commas: their cross product.

Mirrors the fromClause list of PostgreSQL's SelectStmt when it holds more than one item; one item is kept as the item itself. Each item may be referred to by the LATERAL items after it. The facts follow PG-FROM-SCOPE-001. Source: https://www.postgresql.org/docs/17/queries-table-expressions.html#QUERIES-FROM. Status: Implemented.

Reading a FROM listdoctest
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT 1 FROM a, b AS c');
    [count($query->statement->from->items), $query->toString()] // => [2, 'SELECT 1 FROM a, b AS c']
Refusing a list of one itemdoctest
new \SqlSemantics\Platform\PostgreSql\Statement\Relation\RelationList([new \SqlSemantics\Platform\PostgreSql\Statement\Relation\TableInput(new \SqlSemantics\Platform\PostgreSql\Statement\Name\RelationReference(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\QualifiedName(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('t'))))]) // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\InvalidConstruction

Properties§

public non-empty-list<Relation> $items

Methods§

public function __construct(list<Relation> $items)

Parameters

$itemslist<Relation>The FROM items in written order; at least two
Calls 3
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFact

Derives every item and the combined columns.

Parameters

$derivationDerivation
$environmentEnvironment
Calls 2
public function render(Output $out): void

Writes the items separated by commas.

Parameters

$outOutput
Calls 1

Test cases 4§

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

Dedicated tests 1
Other tests reaching this symbol 3

Relations§

Instantiated in 1
Type checks 5
Type declarations 1