classAlterRegistration
final class AlterRegistration
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.ALTER USER [IF EXISTS] account n FACTOR {INITIATE REGISTRATION | FINISH REGISTRATION SET CHALLENGE_RESPONSE AS '…' | UNREGISTER} (8.0.27+).
Mirrors the registration flags of LEX_MFA. Rule: MYSQL-ALTER-REGISTRATION-001. The challenge response is an operand with its exact value. A factor number other than 2 or 3 is reported (MYSQL-ACCOUNT-NUMBER-001). Source: https://dev.mysql.com/doc/refman/8.4/en/alter-user.html#alter-user-registration. Status: Implemented.
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('alter user user() 2 factor initiate registration')->toString() // => 'ALTER USER USER() 2 FACTOR INITIATE REGISTRATION'Properties§
public bool $ifExistspublic Account|SessionUser $userpublic Numeral $factorpublic RegistrationStep $steppublic Text|null $challengeResponse = nullMethods§
public function __construct(
public bool $ifExists,
public Account|SessionUser $user,
public Numeral $factor,
public RegistrationStep $step,
public Text|null $challengeResponse = null,
)Parameters
$ifExists | bool | Whether IF EXISTS is written |
$user | Account|SessionUser | The account |
$factor | Numeral | The factor number as written |
$step | RegistrationStep | The registration step |
$challengeResponse | Text|null | The challenge response of FINISH REGISTRATION |
Calls 2
- static-call Check::input() line 49
- class-const RegistrationStep::Finish() line 49
public function deriveStatement(Derivation $derivation): voidReports a factor number the server rejects.
Parameters
$derivation | Derivation |
Calls 2
- method-call NumberChecks::factor() line 57
- new NumberChecks line 57
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 5
- method-call Output::keyword() line 65
- method-call Output::node() line 69
- class-const RegistrationStep::Initiate() line 71
- class-const RegistrationStep::Unregister() line 72
- class-const RegistrationStep::Finish() line 73
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
AlterRegistrationTestcalls
Relations§
Instantiated in 3
- new SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::registration() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:207
- new SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::registration() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:208
- new SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::registration() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:209