classRoleRule
final class RoleRule
Lowers the role commands.
Rule: PG-ROLE-LOWER-001. Scope: CreateRoleStmt, CreateUserStmt, CreateGroupStmt, OptRoleList, CreateOptRoleElem, AlterRoleStmt, AlterOptRoleList, AlterOptRoleElem, AlterRoleSetStmt, opt_in_database, AlterGroupStmt, DropRoleStmt. Constructors: CreateRole, AlterRole, AlterRoleSetting, AlterGroupMembers, DropRole and the RoleOption classes. The optional WITH before the options (LeafNoise) and ENCRYPTED before PASSWORD (AccessNoise) are noise. UNENCRYPTED PASSWORD and an unknown option word, which the server rejects in the grammar action, are lowered and reported by derivation. Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-createrole.html, https://www.postgresql.org/docs/17/sql-alterrole.html, https://www.postgresql.org/docs/17/sql-altergroup.html, https://www.postgresql.org/docs/17/sql-droprole.html. Status: Implemented.
Methods§
Lowers a role command.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 12
- class-const RoleRule::DROPS() line 88
- new DropRole line 91
- new CreateRole line 95
- class-const RoleWord::Role() line 95
- method-call RoleRule::options() line 95
- class-const RoleWord::User() line 96
- class-const RoleWord::Group() line 97
- new AlterRole line 98
- new AlterRoleSetting line 100
- method-call RoleRule::database() line 100
- new AlterGroupMembers line 104
- static-call ImplementationGap::production() line 105
public function options(Node $list): list<RoleOption>Lowers OptRoleList or AlterOptRoleList: the options in order.
Parameters
$list | Node |
Returns
list<RoleOption>Throws
ImplementationGap When the production has no ruleTest cases 2
Called from 5
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Access\RoleRule::statement() packages/sql-semantics-postgres/src/Lowering/Access/RoleRule.php:95
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Access\RoleRule::statement() packages/sql-semantics-postgres/src/Lowering/Access/RoleRule.php:96
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Access\RoleRule::statement() packages/sql-semantics-postgres/src/Lowering/Access/RoleRule.php:97
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Access\RoleRule::statement() packages/sql-semantics-postgres/src/Lowering/Access/RoleRule.php:98
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Access\RoleRule::statement() packages/sql-semantics-postgres/src/Lowering/Access/RoleRule.php:99
Calls 2
- method-call Lowering::items() line 122
- method-call RoleRule::option() line 123
public function option(Node $item): RoleOptionLowers CreateOptRoleElem or AlterOptRoleElem.
Parameters
$item | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 2
Called from 2
Calls 10
- class-const RoleRule::MEMBERS() line 138
- new RoleMembers line 141
- method-call RoleRule::option() line 145
- new RoleSystemId line 146
- new RolePassword line 147
- new RoleInherit line 151
- new RoleConnectionLimit line 152
- new RoleValidity line 153
- new RoleAttribute line 154
- static-call ImplementationGap::production() line 155
Lowers opt_in_database; no database is null.
Parameters
$database | Node |
Returns
?NameThrows
ImplementationGap When the production has no ruleTest cases 2
Called from 4
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Access\RoleRule::statement() packages/sql-semantics-postgres/src/Lowering/Access/RoleRule.php:100
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Access\RoleRule::statement() packages/sql-semantics-postgres/src/Lowering/Access/RoleRule.php:101
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Access\RoleRule::statement() packages/sql-semantics-postgres/src/Lowering/Access/RoleRule.php:102
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Access\RoleRule::statement() packages/sql-semantics-postgres/src/Lowering/Access/RoleRule.php:103
Calls 1
- static-call ImplementationGap::production() line 171
Private surface 3§
Implementation details, listed for orientation only.
private const DROPS = ['DropRoleStmt: DROP ROLE role_list' => [\SqlSemantics\Platform\PostgreSql\Stat…private const MEMBERS = ['AlterOptRoleElem: USER role_list' => [\SqlSemantics\Platform\PostgreSql\State…private Lowering $loweringTest cases 6§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.