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

Lowers the table lists of multiple-table DELETE and locking clauses, and the duplicate handling of statements that copy rows.

Rule: MYSQL-DML-TARGETS-001. Scope: table_alias_ref_list, table_alias_ref, opt_duplicate, duplicate. A table of the list is a table name or a correlation name with an optional database; the .* suffix names the same table (LeafNoise). REPLACE and IGNORE are DuplicateHandling cases. Terminates: lists are flattened by MYSQL-DML-LIST-001. Source: https://dev.mysql.com/doc/refman/8.4/en/delete.html, https://dev.mysql.com/doc/refman/8.4/en/load-data.html, https://dev.mysql.com/doc/refman/8.4/en/create-table-select.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function tables(Node $list): list<QualifiedName>

Lowers the tables of a node of table_alias_ref_list.

Parameters

$listNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 3
public function wildcards(Node $list): list<OptionalWords>

Tells for each table of a node of table_alias_ref_list whether it is written with .* (opt_wild).

Parameters

$listNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 6
public function duplicates(Node $duplicate): ?DuplicateHandling

Lowers a node of opt_duplicate or duplicate; an absent keyword is null.

Parameters

$duplicateNode

Throws

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

Private surface 2§

Implementation details, listed for orientation only.

private const DUPLICATES = ['opt_duplicate: REPLACE' => \SqlSemantics\Platform\MySql\Statement\Dml\Duplica…
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