PhpBackend implements Backend, Describable
Interfaces
Methods
- __construct() : mixed
- add() : Column
- adopt() : Column
- The same values in this backend's storage: $column itself when this backend owns it, otherwise one copy through builder($definition)->appendTake(). For producers that build columns outside the configured backend.
- allocatedBytes() : int
- Bytes this backend holds outside PHP's memory manager (invisible to memory_get_usage() and memory_limit).
- builder() : ColumnBuilder
- compare() : Column
- constant() : Column
- $value is logical or raw and is cast once through the Definition exactly like ColumnBuilder::append().
- decode() : Column
- Child node lengths and null counts are derived from the buffers, so only the top node travels.
- decodeFrame() : Rows
- A Floe BATCH frame body as Rows under $schema. $codec decodes the buffers stored with a length prefix (a prefix of -1 is a raw buffer). The refusals are the frame's: truncated directory, counts other than the schema's, a column of another row count, a buffer outside the area, a column whose buffers the backend refuses.
- describe() : null|Description
- encodeFrame() : string
- $rows as one Floe BATCH frame body: the directory, then every column's buffers in schema order, each stored raw (prefix -1) or through $codec with its raw length as prefix when that is shorter, 8-byte padded. The exact bytes decodeFrame() reads back.
- fromDescription() : static
- groupedCounts() : GroupedCounts
- groupedTotals() : GroupedTotals
- groupTable() : GroupTable
- isNotNull() : Column
- isNull() : Column
- modulo() : Column
- multiply() : Column
- sort() : Rows
- subtract() : Column
Methods
__construct()
public
__construct() : mixed
add()
public
add(Column $left, Column $right) : Column
Parameters
Return values
Columnadopt()
The same values in this backend's storage: $column itself when this backend owns it, otherwise one copy through builder($definition)->appendTake(). For producers that build columns outside the configured backend.
public
adopt(Definition $definition, Column $column) : Column
Parameters
- $definition : Definition
- $column : Column
Return values
ColumnallocatedBytes()
Bytes this backend holds outside PHP's memory manager (invisible to memory_get_usage() and memory_limit).
public
allocatedBytes() : int
Return values
intbuilder()
public
builder(Definition $definition) : ColumnBuilder
Parameters
- $definition : Definition
-
nullability, the enum class, the datetime zone and the cast plan
Return values
ColumnBuildercompare()
public
compare(Column $left, Operator $operator, Column $right, string $leftName, string $rightName) : Column
Parameters
Return values
Columnconstant()
$value is logical or raw and is cast once through the Definition exactly like ColumnBuilder::append().
public
constant(Definition $definition, mixed $value, int $count) : Column
Parameters
- $definition : Definition
- $value : mixed
- $count : int
Return values
Columndecode()
Child node lengths and null counts are derived from the buffers, so only the top node travels.
public
decode(Definition $definition, array<string|int, mixed> $buffers, int $count, int $nullCount) : Column
Parameters
- $definition : Definition
- $buffers : array<string|int, mixed>
-
the column's subtree buffers as Column::encode() produced them ('' = omitted validity)
- $count : int
- $nullCount : int
Return values
ColumndecodeFrame()
A Floe BATCH frame body as Rows under $schema. $codec decodes the buffers stored with a length prefix (a prefix of -1 is a raw buffer). The refusals are the frame's: truncated directory, counts other than the schema's, a column of another row count, a buffer outside the area, a column whose buffers the backend refuses.
public
decodeFrame(string $body, Schema $schema, Codec $codec) : Rows
Parameters
Return values
Rowsdescribe()
public
describe() : null|Description
Return values
null|Description —null when this instance cannot cross a process boundary (a live client, a custom collaborator)
encodeFrame()
$rows as one Floe BATCH frame body: the directory, then every column's buffers in schema order, each stored raw (prefix -1) or through $codec with its raw length as prefix when that is shorter, 8-byte padded. The exact bytes decodeFrame() reads back.
public
encodeFrame(Rows $rows, Codec $codec) : string
Parameters
Return values
stringfromDescription()
public
static fromDescription(array<string|int, mixed> $data, Rebuild $rebuild) : static
Parameters
- $data : array<string|int, mixed>
- $rebuild : Rebuild
Return values
staticgroupedCounts()
public
groupedCounts() : GroupedCounts
Return values
GroupedCountsgroupedTotals()
public
groupedTotals() : GroupedTotals
Return values
GroupedTotalsgroupTable()
public
groupTable(array<string|int, mixed> $columns, Schema $declared) : GroupTable
Parameters
- $columns : array<string|int, mixed>
- $declared : Schema
Return values
GroupTableisNotNull()
public
isNotNull(Column $column) : Column
Parameters
- $column : Column
Return values
ColumnisNull()
public
isNull(Column $column) : Column
Parameters
- $column : Column
Return values
Columnmodulo()
public
modulo(Column $left, Column $right) : Column
Parameters
Return values
Columnmultiply()
public
multiply(Column $left, Column $right) : Column
Parameters
Return values
Columnsort()
public
sort(Rows $rows, array<string|int, mixed> $columns) : Rows
Parameters
- $rows : Rows
- $columns : array<string|int, mixed>
Return values
Rowssubtract()
public
subtract(Column $left, Column $right) : Column