final class ValuesList
    implements Statement, Query, OutputNaming
    uses Snapshot
Public API: explicitly declared with @visibility public.

VALUES: a constant table of rows written in the query.

Mirrors the valuesLists form of PostgreSQL's SelectStmt. The facts follow PG-VALUES-001. Source: https://www.postgresql.org/docs/17/sql-values.html.

Reading the columns of a VALUES listdoctest
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze("VALUES (1, 'a'), (2, NULL)");
    [$query->field(1)->name->value, $query->field(1)->type->descriptor->name(), $query->field(1)->nullability->name] // => ['column2', 'text', 'Nullable']

Properties§

public non-empty-list<ValuesRow> $rows

Methods§

public function __construct(list<ValuesRow> $rows)

Parameters

$rowslist<ValuesRow>The rows in written order; at least one
Calls 2
public function outputName(): Name

Answers the name of the first column.

Returns

Calls 1
public function deriveStatement(Derivation $derivation): void

Derives the list as a statement root.

Parameters

$derivationDerivation
Calls 2
public function deriveQuery(Derivation $derivation, Environment $outer): QueryFact

Derives the rows and the output columns.

Parameters

$derivationDerivation
$outerEnvironment

Returns

Calls 2
public function render(Output $out): void

Writes VALUES and the rows.

Parameters

$outOutput
Calls 1

Test cases 7§

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

Dedicated tests 1
Other tests reaching this symbol 6

Relations§

Instantiated in 1
Type checks 5
Type declarations 2