classMembershipRule
final class MembershipRule
Lowers GRANT and REVOKE of role membership.
Rule: PG-MEMBERSHIP-LOWER-001. Scope: GrantRoleStmt, RevokeRoleStmt, grant_role_opt_list, grant_role_opt, grant_role_opt_value. Constructors: GrantRole, RevokeRole, MembershipOption. The granted roles are a privilege_list (PG-PRIVILEGE-LOWER-001). Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-grant.html#SQL-GRANT-DESCRIPTION-ROLES, https://www.postgresql.org/docs/17/sql-revoke.html. Status: Implemented.
Methods§
Lowers GrantRoleStmt or RevokeRoleStmt.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 2
Called from 1
Calls 7
- new PrivilegeRule line 55
- new GrantRole line 60
- method-call PrivilegeRule::list() line 60
- method-call PrivilegeRule::grantor() line 60
- method-call MembershipRule::options() line 61
- new RevokeRole line 62
- static-call ImplementationGap::production() line 64
public function options(Node $list): list<MembershipOption>Lowers grant_role_opt_list: the membership options in order.
Parameters
$list | Node |
Returns
list<MembershipOption>Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 4
- method-call Lowering::items() line 78
- static-call ImplementationGap::production() line 81
- new MembershipOption line 84
- class-const MembershipRule::SETTINGS() line 84
Private surface 2§
Implementation details, listed for orientation only.
private const SETTINGS = ['grant_role_opt_value: OPTION' => \SqlSemantics\Platform\PostgreSql\Statement\…private Lowering $loweringTest cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.