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

Lowers the subqueries of the 5.x grammars.

Rule: MYSQL-SUBQUERY-LEGACY-001. Scope: subselect, query_expression_body and query_specification (5.x), select_paren_derived. The query body is a left-recursive union walked in a loop and combined by MYSQL-UNION-LEGACY-001; an ORDER BY or LIMIT written after a parenthesized operand belongs to it. Constructs: the query block, SetOperation, ParenthesizedQuery, QueryExpression. Terminates: the union is walked in a loop; recursion follows nested parentheses. Source: https://dev.mysql.com/doc/refman/5.7/en/subqueries.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

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

Lowers a 5.x subquery: a node of subselect.

Parameters

$subselectNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 3

Private surface 2§

Implementation details, listed for orientation only.

private const UNIONS = ['query_expression_body: query_expression_body UNION_SYM union_option query_spe…
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 2
Method calls 2