classWindowReferences
final class WindowReferences
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): voidReports each window name of the block that its WINDOW clause does not define.
Parameters
$select | Select | |
$derivation | Derivation |
Called from 1
Calls 6
- function-call
array_valuesline 49 - function-call
array_filterline 49 - method-call WindowReferences::names() line 50
- method-call Derivation::report() line 52
- new Misuse line 52
- class-const MisuseRule::UnknownWindow() line 52
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.