final class TableFunction
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

One function call of a FROM item, with the column definitions written for it inside ROWS FROM.

Source: https://www.postgresql.org/docs/17/queries-table-expressions.html#QUERIES-TABLEFUNCTIONS.

Reading the function of a FROM itemdoctest
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT * FROM ROWS FROM (f() AS (a integer))');
    $query->statement->from->functions[0]->definitions[0]->name->value // => 'a'

Properties§

public list<TypedColumn> $definitions
public Scalar $call

Methods§

public function __construct(public Scalar $call, list<TypedColumn> $definitions = [])

Parameters

$callScalarThe function call
$definitionslist<TypedColumn>The column definitions written after AS
Calls 2
public function render(Output $out): void

Writes the call and the column definitions.

Parameters

$outOutput
Calls 2

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 2
Constant reads 1
Type declarations 1