final class ResourceLimit
    implements WithOption
    uses Snapshot
Public API: explicitly declared with @visibility public.

One resource limit of the WITH clause of CREATE USER, ALTER USER or MySQL 5.x GRANT.

Source: https://dev.mysql.com/doc/refman/8.4/en/create-user.html#create-user-resource-limits.

Reading a limitdoctest
$limit = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE USER u WITH MAX_QUERIES_PER_HOUR 10')->statement->resources[0];
    [$limit->kind, $limit->number->text] // => [\SqlSemantics\Platform\MySql\Statement\Account\Option\ResourceKind::QueriesPerHour, '10']

Properties§

public Numeral $number

Methods§

public function __construct(public ResourceKind $kind, public Numeral $number)

Parameters

$kindResourceKindThe limited resource
$numberNumeralThe limit as written
public function render(Output $out): void

Writes the limit.

Parameters

$outOutput
Calls 1

Test cases 2§

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 1

Relations§

Instantiated in 1
Constant reads 2
Type declarations 1