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

Lowers the account lists of CREATE USER, ALTER USER and MySQL 5.x GRANT.

Rule: MYSQL-ACCOUNT-LIST-001. Scope: create_user_list, create_user, alter_user_list, alter_user (8.0+), grant_list, grant_user (5.x). Each entry is the account with what the statement sets for it, as LEX_USER holds it; the multi-factor forms of ALTER USER are factor changes. Constructs: UserSpecification, FactorChange, FactorStep. Terminates: the lists are flattened iteratively; every other child is a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/create-user.html, https://dev.mysql.com/doc/refman/8.4/en/alter-user.html, https://dev.mysql.com/doc/refman/5.7/en/grant.html. Status: Implemented.

Methods§

public function __construct(
    private Lowering $lowering,
    private IdentificationRule $identifications,
)

Parameters

$loweringLoweringThe lowering this rule belongs to
$identificationsIdentificationRuleThe authentication clause rules
public function created(Node $list): list<UserSpecification>
public function altered(Node $list): list<UserAlteration>

Private surface 5§

Implementation details, listed for orientation only.

private const CHANGES = ['alter_user: user identified_by_password REPLACE_SYM TEXT_STRING_password opt_…
private const FACTORS = ['alter_user: user ADD factor identification' => [\SqlSemantics\Platform\MySql\…
private const LISTS = ['create_user_list: create_user' => true, 'create_user_list: create_user_list ,…
private Lowering $lowering
private IdentificationRule $identifications

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 8
Type declarations 1