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

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

$loweringLoweringThe lowering this rule belongs to
public function base(Node $name): ?Name

Lowers the window a specification refines: a node of opt_existing_window_name.

Parameters

$nameNode

Returns

Throws

ImplementationGap When the production has no rule
Test cases 1
Called from 1
Calls 2
public function ordering(Node $clause): list<OrderItem>

Lowers the partitioning or the ordering: a node of opt_partition_clause or opt_window_order_by_clause.

Parameters

$clauseNode

Returns

list<OrderItem>

Throws

ImplementationGap When the production has no rule
Test cases 1
Called from 1
Calls 2
public function frame(Node $clause): ?Frame

Lowers the optional frame: a node of opt_window_frame_clause.

Parameters

$clauseNode

Returns

Throws

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

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 $lowering

Test 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

Relations§

Instantiated in 1
Method calls 2
Type declarations 2