Flow PHP

Any implements ScalarFunction

Read onlyYes
FinalYes

Interfaces

ScalarFunction

Methods

__construct()  : mixed
and()  : All
andNot()  : All
children()  : array<int, ScalarFunction>
Every operand of this node that is an expression, in constructor order.
describe()  : null|Description
deterministic()  : bool
True when this node and every node in children() produce the same value for the same input row.
eval()  : Column
One column of $rows->count() values, of returns()'s type (nullable), same row order.
fromDescription()  : static
or()  : self
orNot()  : self
resolved()  : bool
True when this node and every node in children() can answer returns().
returns()  : Type<string|int, mixed>
The type of the column this function produces, before any row is read.
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

children()

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

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

describe()

public describe() : null|Description
Return values
null|Description —

null when this instance cannot cross a process boundary (a live client, a custom collaborator)

deterministic()

True when this node and every node in children() produce the same value for the same input row.

public deterministic() : bool

False for a generator (now(), uuid, a random string): a caller that evaluates the tree once per FILE or per partition instead of once per row must refuse a non-deterministic one.

Return values
bool

eval()

One column of $rows->count() values, of returns()'s type (nullable), same row order.

public eval(Rows $rows, Backend $backend) : Column
Parameters
$rows : Rows
$backend : Backend
Return values
Column

fromDescription()

public static fromDescription(array<string|int, mixed> $data, Rebuild $rebuild) : static
Parameters
$data : array<string|int, mixed>
$rebuild : Rebuild
Return values
static

resolved()

True when this node and every node in children() can answer returns().

public resolved() : bool
Return values
bool

returns()

The type of the column this function produces, before any row is read.

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

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