classParenthesizedRows
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.
$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§
public ValueRows|ParenthesizedRows $rowsMethods§
public function __construct(public ValueRows|ParenthesizedRows $rows)Parameters
$rows | ValueRows|ParenthesizedRows | The 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): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ParenthesizedRowsTestcalls