classValuesFacts
final class ValuesFacts
Derives the facts of a VALUES list.
Rule: PG-VALUES-001. Every value is derived in the enclosing environment. The columns are named column1, column2, and so on; the type of a column is the common type of its values (PG-UNIFICATION-001), text when all of them are untyped literals, and a column can be NULL when a value can. Rows of different lengths and values that cannot be matched are reported. No field is computed by a single expression. Terminates: one pass over the rows. Source: https://www.postgresql.org/docs/17/sql-values.html, https://www.postgresql.org/docs/17/typeconv-union-case.html. Status: Implemented.
Methods§
public function derive(
ValuesList $values,
Derivation $derivation,
Environment $outer,
): QueryFactDerives every value and answers the output columns.
Parameters
$values | ValuesList | |
$derivation | Derivation | |
$outer | Environment |
Returns
Called from 1
Calls 13
- function-call
countline 40 - method-call Derivation::report() line 45
- new ArityMismatch line 45
- class-const ArityRule::ValuesRows() line 45
- method-call Derivation::scalar() line 49
- new Unification line 52
- method-call Unification::resolve() line 56
- function-call
array_mapline 56 - method-call Unification::nullability() line 60
- new Field line 61
- new OutputSlot line 61
- new Name line 61
- new QueryFact line 64
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ValuesFactsTestcalls