classIntervalRule
final class IntervalRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.
Lowers interval units.
Rule: MYSQL-INTERVAL-UNIT-001. Scope: interval, interval_time_stamp. The SQL_TSI_ spellings are the same keywords to the lexer. Constructs: IntervalUnit. Terminates: one unit production is forwarded at most once. Source: https://dev.mysql.com/doc/refman/8.4/en/expressions.html#temporal-intervals. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
public function unit(Node $unit): IntervalUnitLowers a node of interval or interval_time_stamp.
Parameters
$unit | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 3
- method-call Lowering::form() line 55
- class-const IntervalRule::UNITS() line 60
- static-call ImplementationGap::production() line 60
Private surface 2§
Implementation details, listed for orientation only.
private const UNITS = ['interval: DAY_HOUR_SYM' => \SqlSemantics\Platform\MySql\Statement\Expression\…private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.