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

Lowers account names: users, roles and definers.

Rule: MYSQL-ACCOUNT-NAME-001. Scope: user, user_ident_or_text, role, user_list, definer, definer_opt. An account is a user part and an optional host part, each an identifier, a string or a host name word; or the keyword CURRENT_USER, with or without parentheses. Constructs: AccountName, CurrentUser. Terminates: the user list is flattened iteratively; every other child is a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/account-names.html, https://dev.mysql.com/doc/refman/8.4/en/role-names.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

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

Lowers a comma-separated list of accounts.

Parameters

$listNode

Returns

list<Account>

Throws

ImplementationGap When a production has no rule
Test cases 1
Calls 4
public function definer(Node $definer): ?Account

Lowers a DEFINER clause; an absent clause is null.

Parameters

$definerNode

Returns

Throws

ImplementationGap When the production has no rule
Test cases 1
Calls 2

Private surface 1§

Implementation details, listed for orientation only.

private Lowering $lowering

Test cases 3§

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

Dedicated tests 3

Relations§

Instantiated in 1
Type declarations 1