RowOrder
Read onlyYes
FinalYes
Nulls smallest unless placed, NaN largest, -0.0 = 0.0, strings by bytes; ties keep input order.
Methods
- __construct() : mixed
- compare() : int
- firstAfter() : int
- The first row in [$from, $count) of a batch sorted in this order that sorts after row $boundIndex of $bound - or at or after it when rows equal to the bound are excluded.
- flag() : int
- The sort() flag of this order for non-null physicals of $type: strings, uuids, json, enums, xml and html by bytes, numbers, datetimes, dates, times and bools by value.
- keys() : array<int, SortKey>
- permutation() : array<int, int>
- ties() : array<int, bool>
Methods
__construct()
public
__construct(array<int, SortColumn> $columns) : mixed
Parameters
- $columns : array<int, SortColumn>
compare()
public
compare(array<int, SortKey> $left, int $i, array<int, SortKey> $right, int $j) : int
Parameters
Return values
int —negative when row $i of $left sorts before row $j of $right
firstAfter()
The first row in [$from, $count) of a batch sorted in this order that sorts after row $boundIndex of $bound - or at or after it when rows equal to the bound are excluded.
public
firstAfter(array<int, SortKey> $keys, int $from, int $count, array<int, SortKey> $bound, int $boundIndex, bool $includeEqual) : int
Parameters
- $keys : array<int, SortKey>
- $from : int
- $count : int
- $bound : array<int, SortKey>
- $boundIndex : int
- $includeEqual : bool
Return values
intflag()
The sort() flag of this order for non-null physicals of $type: strings, uuids, json, enums, xml and html by bytes, numbers, datetimes, dates, times and bools by value.
public
static flag(Type<string|int, mixed> $type) : int
Parameters
- $type : Type<string|int, mixed>
Return values
intkeys()
public
keys(Rows $rows) : array<int, SortKey>
Parameters
- $rows : Rows
Return values
array<int, SortKey> —one per column, in column order
permutation()
public
permutation(array<int, SortKey> $keys, int $count) : array<int, int>
Parameters
- $keys : array<int, SortKey>
-
of a batch of $count rows
- $count : int
Return values
array<int, int> —the batch's indices in this order
ties()
public
ties(Rows $partition) : array<int, bool>
Parameters
- $partition : Rows
Return values
array<int, bool> —per row of a partition sorted in this order: equal to the row before it on every column (row 0 never is)