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

The password SET PASSWORD assigns: a string, or in MySQL 5.x a string inside PASSWORD() or OLD_PASSWORD().

The string is an operand with its exact value; it is never masked. Its meaning depends on the release (PasswordFunction). Source: https://dev.mysql.com/doc/refman/8.4/en/set-password.html.

Holding a password written with PASSWORD()doctest
$password = new \SqlSemantics\Platform\MySql\Statement\Account\Password(new \SqlSemantics\Platform\MySql\Statement\Literal\Text('pw'), \SqlSemantics\Platform\MySql\Statement\Account\PasswordFunction::Password);
    [$password->text->value, $password->function?->value] // => ['pw', 'PASSWORD']

Properties§

public Text $text
public PasswordFunction|null $function = null

Methods§

public function __construct(public Text $text, public PasswordFunction|null $function = null)

Parameters

$textTextThe password or hash
$functionPasswordFunction|nullThe function written around it, when one is
public function render(Output $out): void

Writes the string, inside its function when one is written.

Parameters

$outOutput
Calls 2

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 5
Type declarations 4