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.

Describing the problemdoctest
(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 $option
public string $number
public string $error

Methods§

public function __construct(public string $option, public string $number, public string $error)

Parameters

$optionstringWhat the number is written for
$numberstringThe number as written
$errorstringThe server error the statement fails with
public function message(): string

Describes the problem.

Returns

string
Test 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