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

SET RESOURCE GROUP name [FOR thread_id, …] (8.0+): a request to assign threads, or the session's thread, to a resource group.

Mirrors PT_set_resource_group. Rule: MYSQL-RESOURCE-GROUP-001. A thread id written as a decimal or floating number is reported (MYSQL-ACCOUNT-NUMBER-001). Source: https://dev.mysql.com/doc/refman/8.4/en/set-resource-group.html. Status: Implemented.

Assigning two threadsdoctest
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('set resource group batch for 14 15')->toString() // => 'SET RESOURCE GROUP batch FOR 14, 15'

Properties§

public list<Numeral> $threads
public Name $name

Methods§

public function __construct(public Name $name, list<Numeral> $threads = [])

Parameters

$nameNameThe group name
$threadslist<Numeral>The thread ids of FOR; none for the session's thread
Calls 2
public function deriveStatement(Derivation $derivation): void

Reports a thread id that is no integer.

Parameters

$derivationDerivation
Calls 2
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 2