final class GrantRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql\Lowering". Code outside that scope must not name this declaration.

Lowers GRANT and REVOKE of privileges on objects.

Rule: PG-GRANT-LOWER-001. Scope: GrantStmt, RevokeStmt, privilege_target, parameter_name_list, parameter_name. Constructors: Grant, Revoke and the PrivilegeTarget classes; the shared parts are lowered by PG-PRIVILEGE-LOWER-001. The word TABLE before relation names is noise (AccessNoise). Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-grant.html, https://www.postgresql.org/docs/17/sql-revoke.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function parameters(Node $list): list<ParameterName>

Lowers parameter_name_list; each parameter_name is the list of its dotted parts.

Parameters

$listNode

Returns

Test cases 1
Called from 1
Calls 2

Private surface 6§

Implementation details, listed for orientation only.

private const RELATIONS = ['privilege_target: qualified_name_list' => [\SqlSemantics\Platform\PostgreSql\…
private const NAMED = ['privilege_target: FOREIGN DATA_P WRAPPER name_list' => [\SqlSemantics\Platfor…
private const ROUTINES = ['privilege_target: FUNCTION function_with_argtypes_list' => \SqlSemantics\Plat…
private const TYPES = ['privilege_target: DOMAIN_P any_name_list' => \SqlSemantics\Platform\PostgreSq…
private const SCHEMAS = ['privilege_target: ALL TABLES IN_P SCHEMA name_list' => \SqlSemantics\Platform…
private Lowering $lowering

Test cases 6§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 6

Relations§

Instantiated in 1
Method calls 1