classDropUser
final class DropUser
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.DROP USER [IF EXISTS] account, …: a request to remove accounts and their privileges.
Mirrors SQLCOM_DROP_USER. Rule: MYSQL-DROP-USER-001. Accounts are not declared in a context, so the statement has no resolution facts. Source: https://dev.mysql.com/doc/refman/8.4/en/drop-user.html. Status: Implemented.
(new \SqlSemantics\Platform\MySql\Semantics())->analyze("drop user if exists a, 'b'@'h'")->toString() // => 'DROP USER IF EXISTS a, b@h'Properties§
public list<Account> $userspublic bool $ifExistsMethods§
public function __construct(public bool $ifExists, list<Account> $users)Parameters
$ifExists | bool | Whether IF EXISTS is written |
$users | list<Account> | The accounts in order; at least one |
Calls 2
- static-call Check::listOf() line 40
- class-const Account::class() line 40
public function deriveStatement(Derivation $derivation): voidDerives nothing: the statement names no relation and no expression.
Parameters
$derivation | Derivation |
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 55
- method-call Output::list() line 59
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
DropUserTestcalls
Relations§
Instantiated in 3
- new SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::definition() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:105
- new SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::definition() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:106
- new SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::drop() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:273