final class RoleMembers
    implements RoleOption
    uses Snapshot
Public API: explicitly declared with @visibility public.

A role option that lists other roles: ROLE, USER, ADMIN, IN ROLE or IN GROUP.

Source: https://www.postgresql.org/docs/17/sql-createrole.html.

Reading the roles a new role becomes a member ofdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE ROLE joe IN ROLE staff, sales');
    [$operation->statement->options[0]->kind->value, count($operation->statement->options[0]->roles)] // => ['IN ROLE', 2]

Properties§

public non-empty-list<RoleSpec> $roles

Methods§

public function __construct(public RoleMembersKind $kind, list<RoleSpec> $roles)

Parameters

$kindRoleMembersKindThe spelling, which tells what the list means
$roleslist<RoleSpec>The listed roles in the order written, at least one
Calls 2
public function option(): string

Answers the option the list fills.

Returns

string
Test cases 1
Calls 1
public function render(Output $out): void

Writes the keywords and the roles.

Parameters

$outOutput
Calls 2

Test cases 5§

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 3

Relations§

Instantiated in 1
Type checks 2