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

Lowers one item of a SET list.

Rule: MYSQL-SET-ITEM-LOWERING-001. Scope: option_value_no_option_type, option_value_following_option_type, internal_variable_name (5.6, 5.7), and the variable names of lvalue_variable (8.0 and later, also lowered by the leaf rules). Constructs: NameAssignment, SystemAssignment, UserAssignment, SetNames, SetCharacterSet, NamesExpression and, in MySQL 5.6, PasswordAssignment. The values are lowered by MYSQL-SET-VALUE-LOWERING-001. DEFAULT.x names the instance default (UtilityNoise). Terminates: every part is a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/set-variable.html, https://dev.mysql.com/doc/refman/8.4/en/set-names.html, https://dev.mysql.com/doc/refman/8.4/en/set-character-set.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function password(Form $form): bool

Tells whether an item is a MySQL 5.6 password item.

Parameters

$formForm

Returns

bool
Called from 1
Calls 1
public function connection(Form $form): SetItem

Lowers an item that sets the connection character sets, or a MySQL 5.6 password item.

Parameters

$formForm

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 8
public function variable(Node $variable): array{Name, Name|null}

Lowers a variable name and the qualifier written before it: a node of internal_variable_name or lvalue_variable.

Parameters

$variableNode

Returns

array{Name, Name|null}

Throws

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

Private surface 2§

Implementation details, listed for orientation only.

private const PASSWORDS = ['option_value_no_option_type: PASSWORD equal text_or_password' => [null, 2], '…
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 5