final class ReferenceRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql\Lowering\Query". Code outside that scope must not name this declaration.

Lowers the table references and joins of the 8.0 and later grammars.

Rule: MYSQL-JOIN-MODERN-001. Scope: table_reference, esc_table_reference, joined_table, inner_join_type, outer_join_type, natural_join_type, opt_inner, opt_outer. The joins follow the parse: a join on the left is walked in a loop, a join on the right is its own operand. The optional OUTER and the INNER after NATURAL are noise; JOIN, INNER JOIN, CROSS JOIN and STRAIGHT_JOIN are kept as written. Constructs: JoinedTable, JoinOperator, OdbcJoin. Terminates: the left spine is walked in a loop; recursion follows the strictly smaller right operands. Source: https://dev.mysql.com/doc/refman/8.4/en/join.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to

Private surface 4§

Implementation details, listed for orientation only.

private const JOINS = ['joined_table: table_reference inner_join_type table_reference ON_SYM expr' =>…
private const OPERATORS = ['inner_join_type: JOIN_SYM' => \SqlSemantics\Platform\MySql\Statement\Relation…
private const WORDS = ['opt_outer:' => false, 'opt_outer: OUTER_SYM' => true, 'opt_outer: OUTER' => t…
private Lowering $lowering

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 3
Method calls 3