classCurrentUser
final class CurrentUser
implements Account
uses Snapshot
Public API: explicitly declared with
@visibility public.The account of the session, written CURRENT_USER or CURRENT_USER() at an account position.
Source: https://dev.mysql.com/doc/refman/8.4/en/information-functions.html#function_current-user.
$out = new \SqlSemantics\Platform\MySql\Model\Rendering\Output(new \SqlSemantics\Platform\MySql\Rendering\Codec(\SqlSemantics\Platform\MySql\Model\Contract\GrammarRelease::MySql847));
(new \SqlSemantics\Platform\MySql\Statement\Name\CurrentUser())->render($out);
$out->pieces()[0]->text // => 'CURRENT_USER'Properties§
public OptionalWords $parentheses = OptionalWords::OmittedMethods§
public function __construct(public OptionalWords $parentheses = OptionalWords::Omitted)Parameters
$parentheses | OptionalWords | Whether the optional empty parentheses are written |
Calls 1
- class-const OptionalWords::Omitted() line 29
public function render(Output $out): voidWrites the keyword and the parentheses when they are written.
Parameters
$out | Output |
Test cases 1
Calls 3
- method-call Output::keyword() line 38
- class-const OptionalWords::Written() line 39
- method-call Output::glue() line 40
Test cases 8§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 6
UserRuleTest::testAccountLowersEveryAccountFormcallsUserSpecificationTest::testAlteredRefusesFurtherFactorscallsUserSpecificationTest::testCreatedRefusesPasswordManagementWordscallsUserSpecificationTest::testGrantedAcceptsANamedAccountWithItsFirstMethodcallsAccountTest::testBothKindsOfAccountImplementTheInterfacecallsShowGrantsTest::testRefusesUsingWithoutAnAccountcalls