final class WriteScope
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.

Derives the parts that the data manipulation statements share: written columns, values and assignments.

Rule: MYSQL-DML-SCOPE-001. A written column is a column use resolved among the tables the statement writes; it becomes a field with the type and nullability of the column. A value is derived where the statement says; the value DEFAULT is derived where the only field of the environment is the column it is assigned to (MYSQL-DML-DEFAULT-001). Where the server requires distinct written columns (INSERT column lists and INSERT ... SET), a column resolved twice to the same column, or named twice when it does not resolve, is reported. Terminates: one pass over the finite lists. Source: https://dev.mysql.com/doc/refman/8.4/en/insert.html, https://dev.mysql.com/doc/refman/8.4/en/update.html. Status: Implemented.

Methods§

public function field(int $position, ColumnUse $column, ScalarFact $fact): Field
public function assign(
    list<Assignment> $assignments,
    Derivation $derivation,
    Environment $columns,
    Environment $values,
    bool $distinct,
): list<Field>
public function distinct(list<Field> $fields, Derivation $derivation): void

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 6
Method calls 7