Flow PHP

Rank implements PartitionRanking, WindowFunction uses ResolvesFromChildren

FinalYes

Interfaces

PartitionRanking
Opts a WindowFunction into whole-partition evaluation. Ranking derives from a row's position among its peers, which apply() cannot answer without rescanning the partition per row.
WindowFunction

Methods

__construct()  : mixed
apply()  : mixed
children()  : array<int, FunctionTree>
Every operand of this node that is an expression, in constructor order.
over()  : static
Returns a copy bound to $window. Never mutates $this.
rankPartition()  : array<int, int>
One value per partition row, in partition order. The partition is already sorted by the window's ORDER BY.
resolved()  : bool
returns()  : Type<string|int, mixed>
NOT NULL - every row of a partition has a rank
toString()  : string
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

__construct()

public __construct([Window|null $window = null ]) : mixed
Parameters
$window : Window|null = null

children()

Every operand of this node that is an expression, in constructor order.

public children() : array<int, FunctionTree>
Return values
array<int, FunctionTree>

over()

Returns a copy bound to $window. Never mutates $this.

public over(Window $window) : static
Parameters
$window : Window
Return values
static

rankPartition()

One value per partition row, in partition order. The partition is already sorted by the window's ORDER BY.

public rankPartition(Rows $partition) : array<int, int>
Parameters
$partition : Rows
Return values
array<int, int>

returns()

NOT NULL - every row of a partition has a rank

public returns() : Type<string|int, mixed>
Return values
Type<string|int, mixed>

toString()

public toString() : string
Return values
string

withChildren()

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>
Return values
static
On this page

Search results