final class DefaultRevoke
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

The REVOKE action of ALTER DEFAULT PRIVILEGES: privileges future objects of a kind no longer receive.

Mirrors the GrantStmt of DefACLAction without is_grant: the privileges (an empty list is ALL PRIVILEGES), the kind of object, the roles, GRANT OPTION FOR and CASCADE or RESTRICT as written. Source: https://www.postgresql.org/docs/17/sql-alterdefaultprivileges.html.

Reading a default revokedoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER DEFAULT PRIVILEGES REVOKE GRANT OPTION FOR ALL ON FUNCTIONS FROM joe RESTRICT');
    [$operation->statement->action->grantOptionOnly, $operation->statement->action->behavior?->value] // => [true, 'RESTRICT']

Properties§

public list<Privilege> $privileges
public non-empty-list<RoleSpec> $grantees
public bool $grantOptionOnly = false
public DropBehavior|null $behavior = null

Methods§

public function __construct(
    list<Privilege> $privileges,
    public DefaultObjectKind $objects,
    list<RoleSpec> $grantees,
    public bool $grantOptionOnly = false,
    public DropBehavior|null $behavior = null,
)

Parameters

$privilegeslist<Privilege>The privileges in the order written; empty for ALL PRIVILEGES
$objectsDefaultObjectKindThe kind of object the defaults are set for
$granteeslist<RoleSpec>The roles the privileges are revoked from, at least one
$grantOptionOnlyboolWhether GRANT OPTION FOR is written
$behaviorDropBehavior|nullCASCADE or RESTRICT, when written
Calls 4
public function render(Output $out): void

Writes the action.

Parameters

$outOutput
Calls 3

Test cases 3§

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

Dedicated tests 2
Other tests reaching this symbol 1

Relations§

Instantiated in 2
Type declarations 3