classIdentificationRule
final class IdentificationRule
Lowers the authentication clauses of CREATE USER and ALTER USER (8.0+).
Rule: MYSQL-ACCOUNT-IDENTIFICATION-001. Scope: identification, identified_by_password, identified_by_random_password, identified_with_plugin, identified_with_plugin_as_auth, identified_with_plugin_by_password, identified_with_plugin_by_random_password, opt_create_user_with_mfa, opt_initial_auth, opt_replace_password, opt_retain_current_password, opt_discard_old_password, factor. Each clause is one LEX_MFA: the plugin and what is given to it. Passwords and authentication strings keep their exact values. Constructs: Identification. Terminates: unit productions over strict subtrees. Source: https://dev.mysql.com/doc/refman/8.4/en/create-user.html#create-user-authentication. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
public function identification(Node $identification): IdentificationLowers an identification or one of the identified_* rules.
Parameters
$identification | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 9
- method-call SqlSemantics\Platform\MySql\Lowering\Account\IdentificationRule::factors() packages/sql-semantics-mysql/src/Lowering/Account/IdentificationRule.php:91
- method-call SqlSemantics\Platform\MySql\Lowering\Account\IdentificationRule::factors() packages/sql-semantics-mysql/src/Lowering/Account/IdentificationRule.php:92
- method-call SqlSemantics\Platform\MySql\Lowering\Account\IdentificationRule::initial() packages/sql-semantics-mysql/src/Lowering/Account/IdentificationRule.php:113
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::create() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:109
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::create() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:110
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::alter() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:143
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::alter() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:153
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::factors() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:170
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::alter() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:144
Calls 8
- method-call Lowering::form() line 58
- class-const IdentificationRule::FORWARD() line 60
- static-call ImplementationGap::production() line 61
- new Identification line 69
- class-const Credential::Password() line 69
- class-const Credential::RandomPassword() line 70
- class-const Credential::None() line 71
- class-const Credential::Hash() line 72
public function factors(Node $factors): list<Identification>Lowers the further factors of CREATE USER; an absent clause is empty.
Parameters
$factors | Node |
Returns
list<Identification>Throws
ImplementationGap When the production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::create() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:109
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::create() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:111
Calls 3
- method-call Lowering::form() line 87
- method-call IdentificationRule::identification() line 91
- static-call ImplementationGap::production() line 93
public function initial(Node $initial): IdentificationLowers the INITIAL AUTHENTICATION clause of a passwordless account.
Parameters
$initial | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 4
- method-call Lowering::form() line 104
- function-call
in_arrayline 105 - static-call ImplementationGap::production() line 110
- method-call IdentificationRule::identification() line 113
Lowers an opt_replace_password; an absent clause is null.
Parameters
$replace | Node |
Returns
?TextThrows
ImplementationGap When the production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Account\PasswordRule::statement() packages/sql-semantics-mysql/src/Lowering/Account/PasswordRule.php:76
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::alter() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:147
Calls 2
- method-call Lowering::form() line 123
- static-call ImplementationGap::production() line 128
public function retain(Node $retain): boolLowers an opt_retain_current_password.
Parameters
$retain | Node |
Returns
boolThrows
ImplementationGap When the production has no ruleCalled from 3
- method-call SqlSemantics\Platform\MySql\Lowering\Account\PasswordRule::statement() packages/sql-semantics-mysql/src/Lowering/Account/PasswordRule.php:76
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::alter() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:146
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::alter() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:148
Calls 2
- method-call Lowering::form() line 139
- static-call ImplementationGap::production() line 144
public function discard(Node $discard): boolLowers an opt_discard_old_password.
Parameters
$discard | Node |
Returns
boolThrows
ImplementationGap When the production has no ruleCalled from 1
Calls 2
- method-call Lowering::form() line 155
- static-call ImplementationGap::production() line 160
Lowers a factor: the number before FACTOR, as written.
Parameters
$factor | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::factors() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:169
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::registration() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:204
Calls 2
- method-call Lowering::form() line 171
- static-call ImplementationGap::production() line 173
Private surface 2§
Implementation details, listed for orientation only.
private const FORWARD = ['identification: identified_by_password' => true, 'identification: identified_…private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
IdentificationRuleTestcalls
Relations§
Instantiated in 4
- new SqlSemantics\Platform\MySql\Lowering\Account\LegacyGrantRule::grant() packages/sql-semantics-mysql/src/Lowering/Account/LegacyGrantRule.php:72
- new SqlSemantics\Platform\MySql\Lowering\Account\LegacyGrantRule::users() packages/sql-semantics-mysql/src/Lowering/Account/LegacyGrantRule.php:138
- new SqlSemantics\Platform\MySql\Lowering\Account\PasswordRule::statement() packages/sql-semantics-mysql/src/Lowering/Account/PasswordRule.php:73
- new SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::__construct() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:61
Method calls 17
- method-call SqlSemantics\Platform\MySql\Lowering\Account\PasswordRule::statement() packages/sql-semantics-mysql/src/Lowering/Account/PasswordRule.php:76
- method-call SqlSemantics\Platform\MySql\Lowering\Account\PasswordRule::statement() packages/sql-semantics-mysql/src/Lowering/Account/PasswordRule.php:76
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::create() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:109
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::create() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:109
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::create() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:110
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::create() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:110
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::create() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:111
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::alter() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:143
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::alter() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:146
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::alter() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:153
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::alter() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:154
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::factors() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:169
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::factors() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:170
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::alter() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:144
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::alter() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:147
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::alter() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:148
- method-call SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::registration() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:204