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

Validates and writes the privilege list of GRANT and REVOKE.

Rule: PG-PRIVILEGE-LIST-001. Scope: privileges, privilege_list. The server keeps ALL PRIVILEGES as an empty list and ALL with a column list as one privilege without a name; the grammar offers ALL only alone, so a list that holds ALL holds nothing else. The roles of a role grant are a privilege_list, which has no ALL and at least one item. Termination: one pass over a finite list. Source: https://www.postgresql.org/docs/17/sql-grant.html. Status: Implemented.

Methods§

public function privileges(array<array-key, object|array<array-key, object|scalar|null>|scalar|null> $privileges): list<Privilege>
public function roles(array<array-key, object|array<array-key, object|scalar|null>|scalar|null> $roles): non-empty-list<Privilege>

Narrows a constructor argument to the role list of a role grant.

Parameters

$rolesarray<array-key, object|array<array-key, object|scalar|null>|scalar|null>

Returns

non-empty-list<Privilege>

Throws

InvalidConstruction When the argument is no role list the grammar can write
Test cases 1
Called from 2
Calls 4

Test cases 3§

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

Dedicated tests 3

Relations§

Instantiated in 10
Method calls 10