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

Lowers the statements, views and unions of the 5.x grammars.

Rule: MYSQL-QUERY-LEGACY-001. Scope: select, select_init, select_init2, select_paren, union_clause, opt_union_clause, union_list, union_opt, opt_union_order_or_limit, union_order_or_limit, order_or_limit, view_select_aux, create_view_select_paren, create_view_select, and the union that follows create_select. The grammar nests a union to the right; it is walked in a loop and combined by MYSQL-UNION-LEGACY-001. Parenthesized selects are parenthesized queries. Constructs: the query block, SetOperation, ParenthesizedQuery, QueryExpression, QueryStatement. Terminates: the union is walked in a loop; recursion follows nested parentheses, which are strict subtrees. Source: https://dev.mysql.com/doc/refman/5.7/en/union.html, https://dev.mysql.com/doc/refman/5.7/en/create-view.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function statement(Node $select): Query

Lowers a 5.x query statement: a node of select.

Parameters

$selectNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 4
public function viewQuery(Node $aux): Query

Lowers the query of a 5.x view definition: a node of view_select_aux.

Parameters

$auxNode

Returns

Throws

ImplementationGap When a production has no rule
Test cases 1
Called from 1
Calls 6

Private surface 1§

Implementation details, listed for orientation only.

private Lowering $lowering

Test cases 2§

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

Dedicated tests 2

Relations§

Instantiated in 7
Method calls 7