classSetRole
final class SetRole
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.SET ROLE {DEFAULT | NONE | ALL [EXCEPT role, …] | role, …} (8.0+): a request to change the active roles of the session.
Mirrors PT_set_role. Rule: MYSQL-SET-ROLE-001. Source: https://dev.mysql.com/doc/refman/8.4/en/set-role.html. Status: Implemented.
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('set role r1, r2')->toString() // => 'SET ROLE r1, r2'Properties§
public RoleSelection $rolesMethods§
public function __construct(public RoleSelection $roles)Parameters
$roles | RoleSelection | The roles to activate |
public function deriveStatement(Derivation $derivation): voidDerives nothing: the statement names no relation and no expression.
Parameters
$derivation | Derivation |
public function render(Output $out): voidTest cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
SetRoleTestcalls
Other tests reaching this symbol 1
Relations§
Instantiated in 4
- new SqlSemantics\Platform\MySql\Lowering\Account\RoleRule::statement() packages/sql-semantics-mysql/src/Lowering/Account/RoleRule.php:53
- new SqlSemantics\Platform\MySql\Lowering\Account\RoleRule::statement() packages/sql-semantics-mysql/src/Lowering/Account/RoleRule.php:54
- new SqlSemantics\Platform\MySql\Lowering\Account\RoleRule::statement() packages/sql-semantics-mysql/src/Lowering/Account/RoleRule.php:55
- new SqlSemantics\Platform\MySql\Lowering\Account\RoleRule::statement() packages/sql-semantics-mysql/src/Lowering/Account/RoleRule.php:56