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

One assignment column = value of SET, ON DUPLICATE KEY UPDATE, UPDATE or LOAD DATA.

The statement that holds the assignment resolves the column among the tables it writes and derives the value; = and := are one operator here. Source: https://dev.mysql.com/doc/refman/8.4/en/update.html.

Reading an assignment of UPDATEdoctest
$update = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('UPDATE t SET a = a + 1');
    $update->statement->assignments[0]->column->name->value // => 'a'

Properties§

public ColumnUse $column
public Scalar $value

Methods§

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

Parameters

$columnColumnUseThe column assigned to
$valueScalarThe value: an expression or DEFAULT
public function render(Output $out): void

Writes the assignment.

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 3
Constant reads 6
Type declarations 1