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.

Dropping accountsdoctest
(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> $users
public bool $ifExists

Methods§

public function __construct(public bool $ifExists, list<Account> $users)

Parameters

$ifExistsboolWhether IF EXISTS is written
$userslist<Account>The accounts in order; at least one
Calls 2
public function deriveStatement(Derivation $derivation): void

Derives nothing: the statement names no relation and no expression.

Parameters

$derivationDerivation
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 2

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 3
Type declarations 1