enum PrivilegeKind: string
Public API: explicitly declared with @visibility public.

The static privileges, by the words GRANT and REVOKE write them with.

Mirrors the ACL bits of sql/auth/auth_acls.h. The levels a privilege can be granted at follow the masks there: TABLE_ACLS for a table, PROC_ACLS for a routine, DB_ACLS for a database; every privilege can be granted globally. USAGE is no privilege and fits every level. Source: https://dev.mysql.com/doc/refman/8.4/en/privileges-provided.html, https://dev.mysql.com/doc/refman/8.4/en/grant.html#grant-privileges.

Asking where a privilege can be granteddoctest
[\SqlSemantics\Platform\MySql\Statement\Account\Privilege\Item\PrivilegeKind::Reload->database(), \SqlSemantics\Platform\MySql\Statement\Account\Privilege\Item\PrivilegeKind::Execute->routine()] // => [false, true]

Cases§

case Select = 'SELECT'
case Insert = 'INSERT'
case Update = 'UPDATE'
case References = 'REFERENCES'
case Delete = 'DELETE'
case Usage = 'USAGE'
case Index = 'INDEX'
case Alter = 'ALTER'
case Create = 'CREATE'
case Drop = 'DROP'
case Execute = 'EXECUTE'
case Reload = 'RELOAD'
case Shutdown = 'SHUTDOWN'
case Process = 'PROCESS'
case File = 'FILE'
case GrantOption = 'GRANT OPTION'
case ShowDatabases = 'SHOW DATABASES'
case Super = 'SUPER'
case CreateTemporaryTables = 'CREATE TEMPORARY TABLES'
case LockTables = 'LOCK TABLES'
case ReplicationSlave = 'REPLICATION SLAVE'
case ReplicationClient = 'REPLICATION CLIENT'
case CreateView = 'CREATE VIEW'
case ShowView = 'SHOW VIEW'
case CreateRoutine = 'CREATE ROUTINE'
case AlterRoutine = 'ALTER ROUTINE'
case CreateUser = 'CREATE USER'
case Event = 'EVENT'
case Trigger = 'TRIGGER'
case CreateTablespace = 'CREATE TABLESPACE'
case CreateRole = 'CREATE ROLE'
case DropRole = 'DROP ROLE'

Methods§

public function words(): list<string>
public function routine(): bool

Tells whether the privilege can be granted on a stored routine (PROC_ACLS).

Returns

bool
Test cases 1
Calls 5
public function database(): bool

Tells whether the privilege can be granted on a database (DB_ACLS).

Returns

bool
Calls 8

Test cases 6§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 5
Other tests reaching this symbol 1

Relations§

Method calls 2
Constant reads 64
Type declarations 1