classNumberOutOfRange
final class NumberOutOfRange
implements Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A number that an account statement writes outside the range the server accepts for it.
The server rejects the statement while parsing it: ER_WRONG_VALUE for a PASSWORD EXPIRE INTERVAL outside 1 to 65535 days, a FAILED_LOGIN_ATTEMPTS or PASSWORD_LOCK_TIME above 32767, and a factor number other than 2 or 3; ER_ONLY_INTEGERS_ALLOWED for a decimal or floating number at a position that takes an integer. Source: https://dev.mysql.com/doc/refman/8.4/en/create-user.html#create-user-password-management, https://dev.mysql.com/doc/refman/8.4/en/alter-user.html#alter-user-multifactor.
(new \SqlSemantics\Platform\MySql\Statement\Account\Problem\NumberOutOfRange('DAY', '0', 'ER_WRONG_VALUE'))->message() // => 'The value 0 is not accepted for DAY (ER_WRONG_VALUE).'Properties§
public string $optionpublic string $numberpublic string $errorMethods§
public function __construct(public string $option, public string $number, public string $error)Parameters
$option | string | What the number is written for |
$number | string | The number as written |
$error | string | The server error the statement fails with |
public function message(): stringDescribes the problem.
Returns
stringTest cases 1
Test cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 4
Relations§
Instantiated in 3
- new SqlSemantics\Platform\MySql\Rules\Account\NumberChecks::range() packages/sql-semantics-mysql/src/Rules/Account/NumberChecks.php:67
- new SqlSemantics\Platform\MySql\Rules\Account\NumberChecks::range() packages/sql-semantics-mysql/src/Rules/Account/NumberChecks.php:69
- new SqlSemantics\Platform\MySql\Rules\Account\NumberChecks::factor() packages/sql-semantics-mysql/src/Rules/Account/NumberChecks.php:79