classRevokeRoles
final class RevokeRoles
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.REVOKE [IF EXISTS] role, … FROM account, … [IGNORE UNKNOWN USER] (8.0+): a request to revoke roles.
Mirrors PT_revoke_roles. Rule: MYSQL-REVOKE-ROLES-001. An item that is no role is a RoleOrPrivilegeMismatch by MYSQL-PRIVILEGE-CHECKS-001. Source: https://dev.mysql.com/doc/refman/8.4/en/revoke.html. Status: Implemented.
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('revoke if exists r from u, v')->toString() // => 'REVOKE IF EXISTS r FROM u, v'Properties§
public list<Grantable> $rolespublic list<Account> $userspublic bool $ifExistspublic bool $ignoreUnknownUser = falseMethods§
public function __construct(
public bool $ifExists,
list<Grantable> $roles,
list<Account> $users,
public bool $ignoreUnknownUser = false,
)Parameters
Calls 4
- static-call Check::listOf() line 51
- class-const Grantable::class() line 51
- class-const Account::class() line 52
- static-call Check::input() line 54
public function deriveStatement(Derivation $derivation): voidReports the items that are no roles.
Parameters
$derivation | Derivation |
Calls 2
- method-call PrivilegeChecks::roles() line 63
- new PrivilegeChecks line 63
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 71
- method-call Output::list() line 75
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
RevokeRolesTestcalls