final class Roles
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Lowers role specifications.

Rule: PG-ROLE-001. Scope: RoleSpec, RoleId, role_list. Constructor: RoleSpec. The word public, quoted or not, designates every role; the word none is reserved and rejected by the grammar action. RoleId is a position that takes a role name only, so every designation there is rejected by the grammar action as well. Termination: the list is flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-grant.html, https://www.postgresql.org/docs/17/sql-createrole.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function name(Node $role): Name

Lowers RoleId: a position that names a role and accepts no designation.

Parameters

$roleNode

Returns

Throws

AnalysisException When a designation is written, which the action of `RoleId: RoleSpec` in `gram.y` rejects
ImplementationGap When the production has no rule
Calls 3
public function roles(Node $list): list<RoleSpec>

Lowers role_list.

Parameters

$listNode

Returns

list<RoleSpec>
Calls 2

Private surface 1§

Implementation details, listed for orientation only.

private Lowering $lowering

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 1
Type declarations 1