final class ShowCreateUser
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

SHOW CREATE USER: the CREATE USER statement that reproduces an account (MySQL 5.7 and later).

Rule: MYSQL-SHOW-CREATE-USER-001. One column, named CREATE USER for user@host after the account written (host % when none is written); for CURRENT_USER the name depends on the current user of the session and the shape is open. Terminates: a fixed layout. Source: https://dev.mysql.com/doc/refman/8.4/en/show-create-user.html. Status: Implemented.

Reading the column named after the accountdoctest
$show = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SHOW CREATE USER u');
    [$show->field(0)->name?->value, $show->toString()] // => ['CREATE USER for u@%', 'SHOW CREATE USER u']

Properties§

public Account $user

Methods§

public function __construct(public Account $user)

Parameters

$userAccountThe account
public function deriveStatement(Derivation $derivation): void

Derives the rows.

Parameters

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

Writes the statement.

Parameters

$outOutput
Calls 1

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 2
Type declarations 1