classUserRule
final class UserRule
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
$lowering | Lowering | The lowering this rule belongs to |
Lowers one account.
Parameters
$account | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 2
Calls 5
- new AccountName line 53
- new CurrentUser line 55
- class-const OptionalWords::Written() line 55
- class-const OptionalWords::Omitted() line 55
- static-call ImplementationGap::production() line 56
Lowers a comma-separated list of accounts.
Parameters
$list | Node |
Returns
list<Account>Throws
ImplementationGap When a production has no ruleTest cases 1
Calls 4
- static-call ImplementationGap::production() line 70
- method-call Lists::items() line 73
- new Lists line 73
- method-call UserRule::account() line 74
Lowers a DEFINER clause; an absent clause is null.
Parameters
$definer | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Calls 2
- method-call UserRule::account() line 94
- static-call ImplementationGap::production() line 95
Private surface 1§
Implementation details, listed for orientation only.
private Lowering $loweringTest cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.