classWindows
final class Windows
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.
Derives and writes the window written after OVER: a window name or a window specification.
Rule: MYSQL-WINDOWING-001. A window name refers to a window of the WINDOW clause of the same query block, which the query family resolves; a specification is derived at the position of the call. Terminates: the specification is a strict part. 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-named-windows.html. Status: Implemented.
Methods§
public function derive(
Name|WindowSpecification|null $over,
Derivation $derivation,
Environment $environment,
): voidDerives the expressions of a window specification.
Parameters
$over | Name|WindowSpecification|null | |
$derivation | Derivation | |
$environment | Environment |
Test cases 1
Called from 4
- method-call SqlSemantics\Platform\MySql\Statement\Call\Aggregate\Aggregate::deriveScalar() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/Aggregate.php:97
- method-call SqlSemantics\Platform\MySql\Statement\Call\Aggregate\GroupConcat::deriveScalar() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/GroupConcat.php:98
- method-call SqlSemantics\Platform\MySql\Statement\Call\Aggregate\JsonObjectAggregate::deriveScalar() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/JsonObjectAggregate.php:74
- method-call SqlSemantics\Platform\MySql\Statement\Call\Window\WindowFunction::deriveScalar() packages/sql-semantics-mysql/src/Statement/Call/Window/WindowFunction.php:84
public function render(Name|WindowSpecification|null $over, Output $out): voidWrites OVER and the window, when there is one.
Parameters
$over | Name|WindowSpecification|null | |
$out | Output |
Test cases 1
Called from 4
- method-call SqlSemantics\Platform\MySql\Statement\Call\Aggregate\Aggregate::render() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/Aggregate.php:118
- method-call SqlSemantics\Platform\MySql\Statement\Call\Aggregate\GroupConcat::render() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/GroupConcat.php:123
- method-call SqlSemantics\Platform\MySql\Statement\Call\Aggregate\JsonObjectAggregate::render() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/JsonObjectAggregate.php:93
- method-call SqlSemantics\Platform\MySql\Statement\Call\Window\WindowFunction::render() packages/sql-semantics-mysql/src/Statement/Call/Window/WindowFunction.php:101
Calls 2
- method-call Output::keyword() line 45
- class-const NameUse::Label() line 45
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Relations§
Instantiated in 8
- new SqlSemantics\Platform\MySql\Statement\Call\Aggregate\Aggregate::deriveScalar() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/Aggregate.php:97
- new SqlSemantics\Platform\MySql\Statement\Call\Aggregate\Aggregate::render() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/Aggregate.php:118
- new SqlSemantics\Platform\MySql\Statement\Call\Aggregate\GroupConcat::deriveScalar() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/GroupConcat.php:98
- new SqlSemantics\Platform\MySql\Statement\Call\Aggregate\GroupConcat::render() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/GroupConcat.php:123
- new SqlSemantics\Platform\MySql\Statement\Call\Aggregate\JsonObjectAggregate::deriveScalar() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/JsonObjectAggregate.php:74
- new SqlSemantics\Platform\MySql\Statement\Call\Aggregate\JsonObjectAggregate::render() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/JsonObjectAggregate.php:93
- new SqlSemantics\Platform\MySql\Statement\Call\Window\WindowFunction::deriveScalar() packages/sql-semantics-mysql/src/Statement/Call/Window/WindowFunction.php:84
- new SqlSemantics\Platform\MySql\Statement\Call\Window\WindowFunction::render() packages/sql-semantics-mysql/src/Statement/Call/Window/WindowFunction.php:101
Method calls 8
- method-call SqlSemantics\Platform\MySql\Statement\Call\Aggregate\Aggregate::deriveScalar() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/Aggregate.php:97
- method-call SqlSemantics\Platform\MySql\Statement\Call\Aggregate\Aggregate::render() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/Aggregate.php:118
- method-call SqlSemantics\Platform\MySql\Statement\Call\Aggregate\GroupConcat::deriveScalar() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/GroupConcat.php:98
- method-call SqlSemantics\Platform\MySql\Statement\Call\Aggregate\GroupConcat::render() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/GroupConcat.php:123
- method-call SqlSemantics\Platform\MySql\Statement\Call\Aggregate\JsonObjectAggregate::deriveScalar() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/JsonObjectAggregate.php:74
- method-call SqlSemantics\Platform\MySql\Statement\Call\Aggregate\JsonObjectAggregate::render() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/JsonObjectAggregate.php:93
- method-call SqlSemantics\Platform\MySql\Statement\Call\Window\WindowFunction::deriveScalar() packages/sql-semantics-mysql/src/Statement/Call/Window/WindowFunction.php:84
- method-call SqlSemantics\Platform\MySql\Statement\Call\Window\WindowFunction::render() packages/sql-semantics-mysql/src/Statement/Call/Window/WindowFunction.php:101