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

Table references written in parentheses: a nested join.

Rule: MYSQL-NESTED-JOIN-001. The parentheses group the references for joining and change no name: every table inside stays visible by its own name. Source: https://dev.mysql.com/doc/refman/8.4/en/nested-join-optimization.html. Status: Implemented.

Reading a nested joindoctest
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT 1 FROM t LEFT JOIN (u, v) ON t.a = u.a');
    $query->statement->from->right->relation instanceof \SqlSemantics\Platform\MySql\Statement\Relation\TableList // => true

Properties§

public Relation $relation

Methods§

public function __construct(public Relation $relation)

Parameters

$relationRelationThe references inside the parentheses
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFact

Derives the references inside the parentheses.

Parameters

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

Writes the references in parentheses.

Parameters

$outOutput
Calls 1

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 2
Type checks 2
Type declarations 2