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

Checks that every window name a query block uses names a window of its WINDOW clause.

Rule: MYSQL-WINDOW-NAME-001. A window name is written after OVER, as the window a parenthesized window specification refines, or as the window a named window of the WINDOW clause refines. It names a window defined in the WINDOW clause of the same query block, compared without regard to letter case; a subquery has a WINDOW clause of its own and is not searched. A name no window of the block has is reported (ER_WINDOW_NO_SUCH_WINDOW, raised while the server resolves the windows). Terminates: the walk visits the finite parts of the block once and stops at subqueries. Source: https://dev.mysql.com/doc/refman/8.4/en/window-functions-named-windows.html. Status: Implemented.

Methods§

public function check(Select $select, Derivation $derivation): void

Reports each window name of the block that its WINDOW clause does not define.

Parameters

$selectSelect
$derivationDerivation
Called from 1
Calls 6
public function names(list<Node> $parts): list<Name>

Answers the window names used in parts of a query block, in written order, without entering subqueries.

Parameters

$partslist<Node>

Returns

list<Name>
Test cases 1
Called from 1
Calls 5

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 1
Method calls 1