classTableList
final class TableList
implements Relation
uses Snapshot
Public API: explicitly declared with
@visibility public.Table references separated by commas: their cross product, binding more loosely than every JOIN.
A comma list is never a member of another one; written in parentheses it is a nested relation.
Rule: MYSQL-TABLE-LIST-001. The members are derived from left to right by MYSQL-FROM-SCOPE-001; a lateral member sees the members to its left. Source: https://dev.mysql.com/doc/refman/8.4/en/join.html ("the precedence of the comma operator is less than that of INNER JOIN"). Status: Implemented.
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT 1 FROM t, u JOIN v ON u.a = v.a');
[count($query->statement->from->members), $query->statement->from->members[1] instanceof \SqlSemantics\Platform\MySql\Statement\Relation\JoinedTable] // => [2, true]new \SqlSemantics\Platform\MySql\Statement\Relation\TableList([new \SqlSemantics\Platform\MySql\Statement\Relation\Dual()]) // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\InvalidConstructionProperties§
public non-empty-list<Relation> $membersMethods§
public function __construct(list<Relation> $members)Parameters
$members | list<Relation> | The members in written order; at least two |
Calls 3
- static-call Check::listOf() line 48
- class-const Relation::class() line 48
- static-call Check::input() line 50
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFactDerives the members and the shape of their combined rows.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 2
- method-call FromScope::enter() line 59
- new FromScope line 59
public function render(Output $out): voidWrites the members separated by commas.
Parameters
$out | Output |
Calls 1
- method-call Output::list() line 67
Test cases 6§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
Other tests reaching this symbol 3
Relations§
Instantiated in 3
- new SqlSemantics\Platform\MySql\Lowering\Query\Legacy\FactorRule::parens() packages/sql-semantics-mysql/src/Lowering/Query/Legacy/FactorRule.php:115
- new SqlSemantics\Platform\MySql\Lowering\Query\Modern\FactorRule::parens() packages/sql-semantics-mysql/src/Lowering/Query/Modern/FactorRule.php:75
- new SqlSemantics\Platform\MySql\Lowering\Query\Shared\FromRule::tables() packages/sql-semantics-mysql/src/Lowering/Query/Shared/FromRule.php:74
Type checks 4
- instanceof SqlSemantics\Platform\MySql\Rules\Dml\SourceRelations::members() packages/sql-semantics-mysql/src/Rules/Dml/SourceRelations.php:78
- instanceof SqlSemantics\Platform\MySql\Rules\Query\From\FromScope::open() packages/sql-semantics-mysql/src/Rules/Query/From/FromScope.php:53
- instanceof SqlSemantics\Platform\MySql\Rules\Query\From\FromScope::enter() packages/sql-semantics-mysql/src/Rules/Query/From/FromScope.php:83
- instanceof SqlSemantics\Platform\MySql\Statement\Relation\JoinedTable::__construct() packages/sql-semantics-mysql/src/Statement/Relation/JoinedTable.php:65