classObjectLevel
final class ObjectLevel
implements PrivilegeLevel
uses Snapshot
Public API: explicitly declared with
@visibility public.ON [TABLE|FUNCTION|PROCEDURE] [db.]name: one table or stored routine.
For a table the statement records the resolution of the name as the relation fact of this node; a stored routine is not declared in a context, so no fact is recorded for it. Source: https://dev.mysql.com/doc/refman/8.4/en/grant.html#grant-table-privileges, https://dev.mysql.com/doc/refman/8.4/en/grant.html#grant-routine-privileges.
$semantics = new \SqlSemantics\Platform\MySql\Semantics();
$grant = $semantics->analyze('GRANT SELECT ON t TO u', [$semantics->analyze('CREATE TABLE t (a INT)')]);
$grant->facts->relation($grant->statement->level)->table instanceof \SqlSemantics\Platform\MySql\Model\Statement\Reference\Table\DeclaredTable // => trueProperties§
public QualifiedName $nameMethods§
public function __construct(public QualifiedName $name)Parameters
$name | QualifiedName | The object name with its optional database |
Calls 1
- static-call Check::input() line 37
public function describe(): stringpublic function render(Output $out): voidWrites the name.
Parameters
$out | Output |
Calls 3
- method-call Output::name() line 54
- class-const NameUse::Qualifier() line 54
- class-const NameUse::Relation() line 56
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 3
- new SqlSemantics\Platform\MySql\Lowering\Account\PrivilegeRule::level() packages/sql-semantics-mysql/src/Lowering/Account/PrivilegeRule.php:276
- new SqlSemantics\Platform\MySql\Lowering\Account\PrivilegeRule::level() packages/sql-semantics-mysql/src/Lowering/Account/PrivilegeRule.php:277
- new SqlSemantics\Platform\MySql\Lowering\Account\PrivilegeRule::level() packages/sql-semantics-mysql/src/Lowering/Account/PrivilegeRule.php:278
Type checks 5
- instanceof SqlSemantics\Platform\MySql\Rules\Account\PrivilegeChecks::grant() packages/sql-semantics-mysql/src/Rules/Account/PrivilegeChecks.php:70
- instanceof SqlSemantics\Platform\MySql\Rules\Account\PrivilegeChecks::revoke() packages/sql-semantics-mysql/src/Rules/Account/PrivilegeChecks.php:99
- instanceof SqlSemantics\Platform\MySql\Rules\Account\PrivilegeChecks::level() packages/sql-semantics-mysql/src/Rules/Account/PrivilegeChecks.php:112
- instanceof SqlSemantics\Platform\MySql\Rules\Account\PrivilegeChecks::fit() packages/sql-semantics-mysql/src/Rules/Account/PrivilegeChecks.php:135
- instanceof SqlSemantics\Platform\MySql\Rules\Account\PrivilegeChecks::fit() packages/sql-semantics-mysql/src/Rules/Account/PrivilegeChecks.php:141