final class ResultTable
    implements Clause
    uses Snapshot
Public API: explicitly declared with @visibility public.

The result of a function declared RETURNS TABLE ( column type, ... ): a set of rows of these columns.

Source: https://www.postgresql.org/docs/17/sql-createfunction.html.

Counting the result columnsdoctest
$type = new \SqlSemantics\Platform\PostgreSql\Statement\Type\TypeName(new \SqlSemantics\Platform\PostgreSql\Statement\Type\Designation\NamedDesignation(new \SqlSemantics\Platform\PostgreSql\Statement\Name\DottedName([new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('int4')])));
    count((new \SqlSemantics\Platform\PostgreSql\Statement\Routine\ResultTable([new \SqlSemantics\Platform\PostgreSql\Statement\Routine\ResultColumn(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('id'), $type)]))->columns) // => 1

Properties§

public non-empty-list<ResultColumn> $columns

Methods§

public function __construct(list<ResultColumn> $columns)

Parameters

$columnslist<ResultColumn>The columns in order; at least one
Calls 2
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives the column types.

Parameters

$derivationDerivation
$environmentEnvironment
Test cases 1
public function render(Output $out): void

Writes TABLE and the column list.

Parameters

$outOutput
Test cases 1
Calls 1

Test cases 4§

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

Dedicated tests 3
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Type checks 2
Type declarations 2