WindowFunction extends FunctionTree, Describable
Methods
- children() : array<int, FunctionTree>
- Every operand of this node that is an expression, in constructor order.
- describe() : null|Description
- deterministic() : bool
- True when this node and every node in children() produce the same value for the same input row.
- fromDescription() : static
- over() : static
- Returns a copy bound to $window. Never mutates $this.
- resolved() : bool
- True when this node and every node in children() can answer returns().
- returns() : Type<string|int, mixed>
- An OptionalType return declares the produced column nullable; there is no nullable() peer.
- toString() : string
- values() : array<int, mixed>
- One value per row of $partition, which is sorted by the window's ORDER BY.
- window() : Window
- withChildren() : static
- A copy of this node with $children in place of children(): same count, same order, same per-element narrowing. Never mutates $this.
Methods
children()
Every operand of this node that is an expression, in constructor order.
public
children() : array<int, FunctionTree>
Raw scalars, enums, Types and scope-introducing bodies are fields, not children.
Return values
array<int, FunctionTree>describe()
public
describe() : null|Description
Return values
null|Description —null when this instance cannot cross a process boundary (a live client, a custom collaborator)
deterministic()
True when this node and every node in children() produce the same value for the same input row.
public
deterministic() : bool
False for a generator (now(), uuid, a random string): a caller that evaluates the tree once per FILE or per partition instead of once per row must refuse a non-deterministic one.
Return values
boolfromDescription()
public
static fromDescription(array<string|int, mixed> $data, Rebuild $rebuild) : static
Parameters
- $data : array<string|int, mixed>
- $rebuild : Rebuild
Return values
staticover()
Returns a copy bound to $window. Never mutates $this.
public
over(Window $window) : static
Parameters
- $window : Window
Return values
staticresolved()
True when this node and every node in children() can answer returns().
public
resolved() : bool
Return values
boolreturns()
An OptionalType return declares the produced column nullable; there is no nullable() peer.
public
returns() : Type<string|int, mixed>
The frame contributes nothing to the type - Window is a field, not a parameter.
Return values
Type<string|int, mixed>toString()
public
toString() : string
Return values
stringvalues()
One value per row of $partition, which is sorted by the window's ORDER BY.
public
values(Rows $partition, Backend $backend) : array<int, mixed>
Parameters
Return values
array<int, mixed>window()
public
window() : Window
Return values
WindowwithChildren()
A copy of this node with $children in place of children(): same count, same order, same per-element narrowing. Never mutates $this.
public
withChildren(array<int, FunctionTree> $children) : static
Parameters
- $children : array<int, FunctionTree>