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

Lowers REFERENCES clauses.

Rule: MYSQL-REFERENCES-LOWERING-001. Scope: references, opt_references, opt_ref_list, ref_list, reference_list, opt_match_clause, opt_on_update_delete, delete_option. The referential actions are kept in written order. Constructs: References, ReferentialAction. Terminates: lists are flattened iteratively. Source: https://dev.mysql.com/doc/refman/8.4/en/create-table-foreign-keys.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function columns(Node $list): list<Name>|null

Lowers the parent column list: a node of opt_ref_list; no list is null.

Parameters

$listNode

Returns

list<Name>|null

Throws

ImplementationGap When a production has no rule
Test cases 1
Called from 1
Calls 4

Private surface 5§

Implementation details, listed for orientation only.

private const MATCHES = ['opt_match_clause:' => null, 'opt_match_clause: MATCH FULL' => \SqlSemantics\P…
private const ACTIONS = ['opt_on_update_delete:' => [], 'opt_on_update_delete: ON UPDATE_SYM delete_opt…
private const OPTIONS = ['delete_option: RESTRICT' => \SqlSemantics\Platform\MySql\Statement\Table\Key\…
private const COLUMNS = ['ref_list: ref_list , ident', 'ref_list: ident', 'reference_list: reference_li…
private Lowering $lowering

Test cases 4§

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

Dedicated tests 4

Relations§

Instantiated in 3
Method calls 4