classResourceLimit
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.
$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 ResourceKind $kindpublic Numeral $numberMethods§
public function __construct(public ResourceKind $kind, public Numeral $number)Parameters
$kind | ResourceKind | The limited resource |
$number | Numeral | The limit as written |
public function render(Output $out): voidTest cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ResourceLimitTestcalls
Other tests reaching this symbol 1
Relations§
Instantiated in 1
Constant reads 2
- class-const SqlSemantics\Platform\MySql\Statement\Account\AlterUser::__construct() packages/sql-semantics-mysql/src/Statement/Account/AlterUser.php:78
- class-const SqlSemantics\Platform\MySql\Statement\Account\CreateUser::__construct() packages/sql-semantics-mysql/src/Statement/Account/CreateUser.php:79