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

Lowers the role statements and role lists (8.0+).

Rule: MYSQL-ACCOUNT-ROLE-001. Scope: create_role_stmt, drop_role_stmt, set_role_stmt, role_list, opt_except_role_list, opt_with_roles. A role name has the two parts of an account name. Constructs: CreateRole, DropRole, SetRole, SetDefaultRole, RoleSelection. Terminates: the role list is flattened iteratively; every other child is a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/roles.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function statement(Form $form): Statement
public function roles(Node $list): non-empty-list<AccountName>

Lowers a role_list.

Parameters

$listNode

Returns

non-empty-list<AccountName>

Throws

ImplementationGap When a production has no rule
Called from 10
Calls 5
public function withRoles(Node $clause): ?RoleSelection

Lowers the opt_with_roles of GRANT … AS; an absent clause is null.

Parameters

$clauseNode

Throws

ImplementationGap When the production has no rule
Called from 1
Calls 9

Private surface 1§

Implementation details, listed for orientation only.

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 4
Method calls 4