classShowCreateUser
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.
$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 $userMethods§
public function deriveStatement(Derivation $derivation): voidDerives the rows.
Parameters
$derivation | Derivation |
Calls 7
- new ShowFacts line 48
- method-call Derivation::output() line 50
- method-call ShowFacts::query() line 50
- method-call ShowFacts::open() line 50
- new SessionState line 50
- method-call ShowFacts::shape() line 55
- class-const Report::CreateUser() line 55
public function render(Output $out): voidTest 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
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\LegacyObjectRule::createUser() packages/sql-semantics-mysql/src/Lowering/Utility/Show/LegacyObjectRule.php:224
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\ServerRule::statement() packages/sql-semantics-mysql/src/Lowering/Utility/Show/ServerRule.php:90