classNestedRelation
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.
$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 // => trueProperties§
public Relation $relationMethods§
public function __construct(public Relation $relation)Parameters
$relation | Relation | The references inside the parentheses |
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFactDerives the references inside the parentheses.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 2
- method-call FromScope::enter() line 44
- new FromScope line 44
public function render(Output $out): voidWrites the references in parentheses.
Parameters
$out | Output |
Calls 1
- method-call Output::symbol() line 52
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
NestedRelationTestcalls