classFrameRule
final class FrameRule
Lowers a parenthesized window specification and its frame.
Rule: MYSQL-CALL-FRAME-001. Scope: window_spec, window_spec_details, opt_existing_window_name, opt_partition_clause, opt_window_order_by_clause, opt_window_frame_clause, window_frame_units, window_frame_extent, window_frame_start, window_frame_between, window_frame_bound, opt_window_frame_exclusion. The partitioning and the ordering are lowered by the query family. Constructs: WindowSpec, Frame, FrameBound. Terminates: every child is a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/window-functions-usage.html, https://dev.mysql.com/doc/refman/8.4/en/window-functions-frames.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
public function specification(Node $specification): WindowSpecLowers a window specification: a node of window_spec.
Parameters
$specification | Node |
Returns
Throws
ImplementationGap When a production has no ruleTest cases 1
Called from 2
Calls 5
- method-call Lowering::form() line 80
- new WindowSpec line 85
- method-call FrameRule::base() line 85
- method-call FrameRule::ordering() line 85
- method-call FrameRule::frame() line 85
Lowers the window a specification refines: a node of opt_existing_window_name.
Parameters
$name | Node |
Returns
?NameThrows
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 2
- method-call Lowering::form() line 95
- static-call ImplementationGap::production() line 100
Lowers the partitioning or the ordering: a node of opt_partition_clause or opt_window_order_by_clause.
Parameters
$clause | Node |
Returns
list<OrderItem>Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 2
- method-call Lowering::form() line 112
- static-call ImplementationGap::production() line 117
Lowers the optional frame: a node of opt_window_frame_clause.
Parameters
$clause | Node |
Returns
Throws
ImplementationGap When a production has no ruleTest cases 1
Called from 1
Calls 7
- method-call Lowering::form() line 128
- static-call ImplementationGap::production() line 133
- class-const FrameRule::UNITS() line 136
- function-call
array_key_existsline 138 - class-const FrameRule::EXCLUSIONS() line 138
- new Frame line 143
- method-call FrameRule::bound() line 143
public function bound(Node $bound): FrameBoundLowers a boundary: a node of window_frame_start or window_frame_bound.
Parameters
$bound | Node |
Returns
Throws
ImplementationGap When a production has no ruleTest cases 1
Called from 2
Calls 4
- method-call Lowering::form() line 159
- class-const FrameRule::BOUNDS() line 163
- static-call ImplementationGap::production() line 163
- new FrameBound line 165
Private surface 4§
Implementation details, listed for orientation only.
private const BOUNDS = ['window_frame_start: UNBOUNDED_SYM PRECEDING_SYM' => [\SqlSemantics\Platform\M…private const UNITS = ['window_frame_units: ROWS_SYM' => \SqlSemantics\Platform\MySql\Statement\Call\…private const EXCLUSIONS = ['opt_window_frame_exclusion:' => null, 'opt_window_frame_exclusion: EXCLUDE_SY…private Lowering $loweringTest cases 22§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 5
Other tests reaching this symbol 17
AggregateRuleTest::testAggregateLowersEveryArgumentFormcallsAggregateRuleTest::testAggregateReportsAnotherNodecallsAggregateRuleTest::testConcatenationLowersGroupConcatcallsAggregateRuleTest::testDistinctTellsWhetherDistinctIsWrittencallsAggregateRuleTest::testOperandLowersAllcallsAggregateRuleTest::testOrderingLowersNoOrderingcallsAggregateRuleTest::testSeparatorLowersNoSeparatorcallsAggregateRuleTest::testSingleLowersOneOperandAsAListcallsWindowRuleTest::testEdgeLowersFromFirstcallsWindowRuleTest::testFunctionLowersTheValueFunctionscallsWindowRuleTest::testFunctionReportsAnotherNodecallsWindowRuleTest::testNameLowersAWindowNamecallsWindowRuleTest::testNullsLowersNoTreatmentcallsWindowRuleTest::testOffsetLowersTheOffsetAndTheDefaultcallsWindowRuleTest::testStableLowersEachFormcallsWindowRuleTest::testWindowingLowersNoWindowcallsWindowRuleTest::testWindowLowersASpecificationcalls