classDefaultRequest
final class DefaultRequest
implements Scalar
uses Snapshot
@visibility public.The keyword DEFAULT used as a value: the default of the column it is assigned to.
Mirrors PostgreSQL's SetToDefault node. The value is only meaningful where a statement assigns it to a column (a VALUES row of INSERT, an UPDATE SET item); the statement that holds the assignment knows the column.
Rule: PG-DEFAULT-001. Facts: until the assignment converts it to the column type, the value has the pseudo-type unknown, like a string constant whose type its context decides; it can be NULL. Source: https://www.postgresql.org/docs/17/sql-insert.html, https://www.postgresql.org/docs/17/sql-update.html. Status: Implemented.
(new \SqlSemantics\Platform\PostgreSql\Statement\Expression\DefaultRequest()) instanceof \SqlSemantics\Platform\PostgreSql\Model\Statement\Scalar // => trueMethods§
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFactDerives the pseudo-type the assignment resolves.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 4
- new ScalarFact line 42
- new Known line 42
- class-const Builtin::Unknown() line 42
- class-const Nullability::Nullable() line 42
public function render(Output $out): voidTest cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 3
Relations§
Instantiated in 1
Type checks 3
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Expression\Precedence::predicates() packages/sql-semantics-postgres/src/Rules/Expression/Precedence.php:257
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Manipulation\Assignments::requested() packages/sql-semantics-postgres/src/Rules/Manipulation/Assignments.php:147
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Manipulation\Placement::values() packages/sql-semantics-postgres/src/Rules/Manipulation/Placement.php:82