classValueRows
final class ValueRows
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.The VALUES rows of an INSERT: rows whose values are assigned to the target columns one by one.
PostgreSQL treats a VALUES list that is the whole source of an INSERT apart from a query: each value is converted to the type of the column it is assigned to, and a value may be DEFAULT. Source: https://www.postgresql.org/docs/17/sql-insert.html, https://www.postgresql.org/docs/17/sql-values.html.
$insert = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('INSERT INTO t VALUES (1), (DEFAULT)');
count($insert->statement->rows->rows()) // => 2new \SqlSemantics\Platform\PostgreSql\Statement\Manipulation\ValueRows([]) // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\InvalidConstructionProperties§
public non-empty-list<ValuesRow> $rowsMethods§
public function __construct(list<ValuesRow> $rows)Parameters
$rows | list<ValuesRow> | The rows in written order; at least one |
Throws
InvalidConstruction When there is no rowCalls 2
- static-call Check::listOf() line 45
- class-const ValuesRow::class() line 45
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
ValueRowsTestcalls
Relations§
Instantiated in 1
Type declarations 3
- type SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\InsertRule packages/sql-semantics-postgres/src/Lowering/Manipulation/InsertRule.php:106
- type SqlSemantics\Platform\PostgreSql\Statement\Manipulation\InsertRows packages/sql-semantics-postgres/src/Statement/Manipulation/InsertRows.php:67
- type SqlSemantics\Platform\PostgreSql\Statement\Manipulation\ParenthesizedRows packages/sql-semantics-postgres/src/Statement/Manipulation/ParenthesizedRows.php:31