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

Lowers CREATE USER, ALTER USER, DROP USER and RENAME USER of every release.

Rule: MYSQL-ACCOUNT-USER-001. Scope: the create:, alter: and drop: productions MYSQL-DEFINITION-ROUTES-001 routes here (5.x), alter_user_stmt, alter_user_command, drop_user_stmt (8.0+), alter_user_list of 5.6, rename_list, user_func, opt_user_registration. The marker clear_privileges holds no operand. Constructs: CreateUser, AlterUser, ExpireUserPasswords, AlterDefaultRole, AlterRegistration, DropUser, RenameUser, SessionUser. Terminates: the lists are flattened iteratively; every other child is a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/account-management-statements.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
Calls 3
public function defaultRoles(Node $clause): list<AccountName>

Lowers the DEFAULT ROLE clause of CREATE USER; an absent clause is empty.

Parameters

$clauseNode

Returns

Throws

ImplementationGap When the production has no rule
Called from 1
Calls 4
public function expired(Node $list): list<Account>

Lowers the MySQL 5.6 alter_user_list: accounts each followed by PASSWORD EXPIRE.

Parameters

$listNode

Returns

list<Account>

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 3
public function drop(Form $form): DropUser
public function rename(Node $list): RenameUser

Private surface 4§

Implementation details, listed for orientation only.

private ClauseRule $clauses
private IdentificationRule $identifications
private UserListRule $lists
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