classExpressionRules
final class ExpressionRules
The entry rules of the expression family: the methods other families and the statement dispatcher call.
Rule: MYSQL-EXPRESSION-ENTRY-001. Scope: expr, bool_pri, predicate, bit_expr, simple_expr, operators, CASE, casts, intervals, row constructors, subquery expressions and MATCH. A method delegates to the rule class of the level it lowers: MYSQL-CONDITION-001, MYSQL-PREDICATE-001, MYSQL-BIT-EXPR-001, MYSQL-SIMPLE-EXPR-001, MYSQL-EXPRESSION-LIST-001 and MYSQL-INTERVAL-UNIT-001. Source: https://dev.mysql.com/doc/refman/8.4/en/expressions.html. Status: Implemented.
Properties§
public Lowering $loweringMethods§
public function __construct(public Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers an expression: a node of expr.
Parameters
$expression | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 2
- method-call ConditionRule::expression() line 44
- new ConditionRule line 44
Lowers an arithmetic or bit expression: a node of bit_expr.
Parameters
$expression | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalls 2
- method-call BitRule::bitExpression() line 54
- new BitRule line 54
Lowers a primary expression: a node of simple_expr.
Parameters
$expression | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalls 2
- method-call PrimaryRule::simpleExpression() line 64
- new PrimaryRule line 64
public function expressions(Node $list): list<Scalar>Lowers a comma-separated expression list: a node of expr_list or opt_expr_list; an absent list
is empty.
Parameters
$list | Node |
Returns
list<Scalar>Throws
ImplementationGap When a production has no ruleCalls 2
- method-call ListRule::expressions() line 76
- new ListRule line 76
public function intervalUnit(Node $unit): IntervalUnitLowers an interval unit: a node of interval or interval_time_stamp.
Parameters
$unit | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 2
- method-call IntervalRule::unit() line 86
- new IntervalRule line 86
Lowers the interval INTERVAL quantity unit from the node of its quantity (expr) and of its unit (interval).
Returns
Throws
ImplementationGap When a production has no ruleCalls 3
- new Interval line 96
- method-call ExpressionRules::expression() line 96
- method-call ExpressionRules::intervalUnit() line 96
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ExpressionRulesTestcalls