final class GrantedRole
    implements Grantable
    uses Snapshot
Public API: explicitly declared with @visibility public.

A role in the list of GRANT or REVOKE (8.0+).

Mirrors PT_role_or_dynamic_privilege read as a role and PT_role_at_host. Source: https://dev.mysql.com/doc/refman/8.4/en/grant.html#grant-roles.

Reading a granted roledoctest
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('GRANT reader TO u')->statement->roles[0]->role->user->value // => 'reader'

Properties§

public AccountName $role

Methods§

public function __construct(public AccountName $role)

Parameters

$roleAccountNameThe role
public function render(Output $out): void

Writes the role.

Parameters

$outOutput
Calls 1

Test cases 3§

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 2

Relations§

Instantiated in 2
Type checks 5