final class AccountOption
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

One password management or account locking option of CREATE USER or ALTER USER, with its number when it takes one.

The number is kept as written. Several options may be written; for one field the last option written wins in the server, so the list keeps every option in source order. Source: https://dev.mysql.com/doc/refman/8.4/en/create-user.html#create-user-password-management.

Reading a password history optiondoctest
$option = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE USER u PASSWORD HISTORY 5')->statement->options[0];
    [$option->kind, $option->number?->text] // => [\SqlSemantics\Platform\MySql\Statement\Account\Option\AccountOptionKind::HistoryCount, '5']

Properties§

public Numeral|null $number = null

Methods§

public function __construct(public AccountOptionKind $kind, public Numeral|null $number = null)

Parameters

$kindAccountOptionKindThe option
$numberNumeral|nullThe number of an option that takes one
Calls 2
public function render(Output $out): void

Writes the option.

Parameters

$outOutput
Calls 3

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 2
Constant reads 2
Type declarations 1