Flow PHP

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

compare()

public compare(array<int, SortKey> $left, int $i, array<int, SortKey> $right, int $j) : int
Parameters
$left : array<int, SortKey>
$i : int
$right : array<int, SortKey>
$j : int
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
int

flag()

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
int

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)

On this page

Search results