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.

Reading a named windowdoctest
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT 1 WINDOW w AS ()');
    $query->statement->windows[0]->name->value // => 'w'

Properties§

public Name $name

Methods§

public function __construct(public Name $name, public WindowSpecification $window)

Parameters

$nameNameThe window name
$windowWindowSpecificationThe window it names
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives the expressions of the window.

Parameters

$derivationDerivation
$environmentEnvironment
Calls 1
public function render(Output $out): void

Writes the name, AS and the specification.

Parameters

$outOutput
Calls 2

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
Constant reads 1