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

Derives the facts of UPDATE and DELETE.

Rule: MYSQL-UPDATE-001 and MYSQL-DELETE-001. The common tables of WITH are bound first and are visible in every query of the statement. The table references are derived as a FROM clause is (MYSQL-FROM-001), each later reference seeing the earlier ones for LATERAL. The columns of the assignments, their values, WHERE and ORDER BY see every table of the references; the value DEFAULT is the default of its column; LIMIT sees none. An UPDATE whose references hold more than one table is a multiple-table UPDATE, which takes neither ORDER BY nor LIMIT. A single- table DELETE sees its table under its correlation name, or its table name when it has none. Each table a multiple-table DELETE deletes from must name a table of its references. A column an UPDATE assigns, and a table a multiple-table DELETE deletes from, must belong to a table or view; a derived table, a table function or a common table is not updatable (ER_NON_UPDATABLE_TABLE); a generated column takes only DEFAULT (MYSQL-GENERATED-WRITE-001). The statements return no rows. Terminates: one pass over the finite parts. Source: https://dev.mysql.com/doc/refman/8.4/en/update.html, https://dev.mysql.com/doc/refman/8.4/en/delete.html, https://dev.mysql.com/doc/refman/8.4/en/with.html. Status: Implemented.

Methods§

public function delete(Delete $delete, Derivation $derivation, Environment $outer): void
public function updatable(Relation $relation, Derivation $derivation): bool

Tells whether rows of a relation occurrence can be changed: a table or view, not a derived table, a table function or a common table.

Parameters

$relationRelation
$derivationDerivation

Returns

bool
Called from 2
Calls 1
public function references(
    list<Relation> $tables,
    Derivation $derivation,
    Environment $base,
): list<VisibleRelation>

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 3
Method calls 3