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

The entry point of the access family: roles, privileges, role membership, default privileges and owned objects.

Rule: PG-ACCESS-001. Scope: the statement nonterminals of the family (CreateRoleStmt, CreateUserStmt, CreateGroupStmt, AlterRoleStmt, AlterRoleSetStmt, AlterGroupStmt, DropRoleStmt, GrantStmt, RevokeStmt, GrantRoleStmt, RevokeRoleStmt, AlterDefaultPrivilegesStmt, DropOwnedStmt, ReassignOwnedStmt), each handed to the rule of its group. Termination: each statement is lowered by one rule; lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-commands.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function statement(Node $statement): Statement

Lowers a statement of the family, such as CreateRoleStmt, GrantStmt, RevokeRoleStmt or AlterDefaultPrivilegesStmt.

Parameters

$statementNode

Returns

Throws

ImplementationGap When the nonterminal is not a statement of the family
Test cases 1
Called from 1
Calls 10

Private surface 2§

Implementation details, listed for orientation only.

private const GROUPS = ['CreateRoleStmt' => 'role', 'CreateUserStmt' => 'role', 'CreateGroupStmt' => '…
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
Method calls 1
Type declarations 1