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

The VALUES rows of an INSERT written in parentheses that group nothing.

The grammar keeps no node for parentheses around a query, so INSERT INTO t (VALUES (1)) requests the same as INSERT INTO t VALUES (1). Source: https://www.postgresql.org/docs/17/sql-insert.html.

Keeping the parentheses around VALUESdoctest
$insert = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('INSERT INTO t (VALUES (DEFAULT))');
    [count($insert->statement->rows->rows()), $insert->toString()] // => [1, 'INSERT INTO t (VALUES (DEFAULT))']

Properties§

Methods§

public function __construct(public ValueRows|ParenthesizedRows $rows)

Parameters

$rowsValueRows|ParenthesizedRowsThe rows inside the parentheses
public function rows(): non-empty-list<ValuesRow>

Answers the rows inside every pair of parentheses.

Returns

non-empty-list<ValuesRow>
public function render(Output $out): void

Writes the rows in parentheses.

Parameters

$outOutput
Calls 1

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 1
Type declarations 2