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

Lowers UPDATE and DELETE of every release.

Rule: MYSQL-CHANGE-LOWERING-001. Scope: update, delete, single_multi, table_wild_list, table_wild_one, delete_limit_clause (5.6); update_stmt, delete_stmt; opt_low_priority, opt_delete_options, opt_delete_option. An UPDATE is Update; a DELETE with one table after FROM is Delete; the two multiple-table spellings are MultipleDelete with their form. Clauses are lowered by the query family. Terminates: the parts are strict subtrees; option lists are flattened by MYSQL-DML-LIST-001. 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/5.6/en/delete.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function update(Form $form): Update
public function lowPriority(Node $option): bool

Lowers a node of opt_low_priority.

Parameters

$optionNode

Returns

bool

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 2
public function limit(Node $clause): ?Limit

Lowers a LIMIT clause: a node of delete_limit_clause (5.6) or opt_simple_limit; an absent clause is null.

Parameters

$clauseNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 2
Calls 2
public function wildTargets(Node $list): list<QualifiedName>

Lowers the tables to delete from of a node of table_wild_list (5.6).

Parameters

$listNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 5

Private surface 5§

Implementation details, listed for orientation only.

private const UPDATES = ['update: UPDATE_SYM opt_low_priority opt_ignore join_table_list SET update_lis…
private const SINGLE = ['delete_stmt: DELETE_SYM opt_delete_options FROM table_ident opt_use_partition…
private const MULTIPLE = ['delete_stmt: DELETE_SYM opt_delete_options table_alias_ref_list FROM join_tab…
private const OPTIONS = ['opt_delete_option: QUICK' => \SqlSemantics\Platform\MySql\Statement\Dml\Delet…
private Lowering $lowering

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