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

One column = value item of UPDATE SET, ON CONFLICT DO UPDATE SET or MERGE UPDATE SET.

Mirrors a ResTarget of an UPDATE target list; the value may be DEFAULT. The facts follow PG-ASSIGNMENT-001. Source: https://www.postgresql.org/docs/17/sql-update.html.

Reading an assignmentdoctest
$update = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('UPDATE t SET a = DEFAULT');
    $update->statement->assignments[0]->value instanceof \SqlSemantics\Platform\PostgreSql\Statement\Expression\DefaultRequest // => true

Properties§

public ColumnTarget $column
public Scalar $value

Methods§

public function __construct(public ColumnTarget $column, public Scalar $value)

Parameters

$columnColumnTargetThe column written
$valueScalarThe value assigned
public function render(Output $out): void

Writes the column, = and the value.

Parameters

$outOutput
Calls 1

Test cases 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Constant reads 3
Type checks 5