classWindowDefinition
final class WindowDefinition
implements Clause
uses Snapshot
Public API: explicitly declared with
@visibility public.One named window of a WINDOW clause.
Mirrors a named PostgreSQL WindowDef. Its expressions see the input columns of the selection that holds it. Source: https://www.postgresql.org/docs/17/sql-select.html#SQL-WINDOW.
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT 1 WINDOW w AS ()');
$query->statement->windows[0]->name->value // => 'w'Properties§
public Name $namepublic WindowSpecification $windowMethods§
public function __construct(public Name $name, public WindowSpecification $window)Parameters
$name | Name | The window name |
$window | WindowSpecification | The window it names |
public function deriveClause(Derivation $derivation, Environment $environment): voidDerives the expressions of the window.
Parameters
$derivation | Derivation | |
$environment | Environment |
Calls 1
- method-call WindowSpecification::deriveClause() line 45
public function render(Output $out): voidWrites the name, AS and the specification.
Parameters
$out | Output |
Calls 2
- method-call Output::name() line 53
- class-const NameUse::Column() line 53
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
WindowDefinitionTestcalls