classPassword
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.
$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 $textpublic PasswordFunction|null $function = nullMethods§
public function __construct(public Text $text, public PasswordFunction|null $function = null)Parameters
$text | Text | The password or hash |
$function | PasswordFunction|null | The function written around it, when one is |
public function render(Output $out): voidWrites the string, inside its function when one is written.
Parameters
$out | Output |
Calls 2
- method-call Output::node() line 42
- method-call Output::keyword() line 46
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
PasswordTestcalls
Relations§
Instantiated in 5
- new SqlSemantics\Platform\MySql\Lowering\Account\PasswordRule::statement() packages/sql-semantics-mysql/src/Lowering/Account/PasswordRule.php:68
- new SqlSemantics\Platform\MySql\Lowering\Account\PasswordRule::password() packages/sql-semantics-mysql/src/Lowering/Account/PasswordRule.php:90
- new SqlSemantics\Platform\MySql\Lowering\Account\PasswordRule::password() packages/sql-semantics-mysql/src/Lowering/Account/PasswordRule.php:91
- new SqlSemantics\Platform\MySql\Lowering\Account\PasswordRule::password() packages/sql-semantics-mysql/src/Lowering/Account/PasswordRule.php:92
- new SqlSemantics\Platform\MySql\Lowering\Account\PasswordRule::password() packages/sql-semantics-mysql/src/Lowering/Account/PasswordRule.php:93
Type declarations 4
- type SqlSemantics\Platform\MySql\Lowering\Account\AccountRules packages/sql-semantics-mysql/src/Lowering/Account/AccountRules.php:106
- type SqlSemantics\Platform\MySql\Lowering\Account\PasswordRule packages/sql-semantics-mysql/src/Lowering/Account/PasswordRule.php:84
- type SqlSemantics\Platform\MySql\Statement\Account\SetPassword packages/sql-semantics-mysql/src/Statement/Account/SetPassword.php:41
- type SqlSemantics\Platform\MySql\Statement\Utility\Set\PasswordAssignment packages/sql-semantics-mysql/src/Statement/Utility/Set/PasswordAssignment.php:39