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.

Resolving the table of a grantdoctest
$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 // => true

Properties§

Methods§

public function __construct(public QualifiedName $name)

Parameters

$nameQualifiedNameThe object name with its optional database
Calls 1
public function describe(): string

Describes the level.

Returns

string
Test cases 1
public function render(Output $out): void

Writes the name.

Parameters

$outOutput
Calls 3

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
Type checks 5
Type declarations 1