DenseRank 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 dense 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
apply()
public
apply(WindowContext $window) : mixed
Parameters
- $window : WindowContext
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
staticrankPartition()
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>resolved()
public
resolved() : bool
Return values
boolreturns()
NOT NULL - every row of a partition has a dense rank
public
returns() : Type<string|int, mixed>
Return values
Type<string|int, mixed>toString()
public
toString() : string
Return values
stringwindow()
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>