final class SchemaContentsTarget
    implements PrivilegeTarget
    uses Snapshot
Public API: explicitly declared with @visibility public.

Every object of one kind in the named schemas as the objects of a GRANT or REVOKE, such as ALL TABLES IN SCHEMA.

Mirrors the target type ACL_TARGET_ALL_IN_SCHEMA. Which objects the schemas hold is known when the statement runs, so nothing is resolved. Source: https://www.postgresql.org/docs/17/sql-grant.html.

Reading the schemas whose tables are granteddoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('GRANT SELECT ON ALL TABLES IN SCHEMA app TO joe');
    [$operation->statement->target->object()->value, $operation->statement->target->schemas[0]->value] // => ['TABLE', 'app']

Constants§

public const KINDS = [\SqlSemantics\Platform\PostgreSql\Statement\Catalog\Access\Target\PrivilegeObj…

The kinds that can be granted for whole schemas.

Properties§

public non-empty-list<Name> $schemas

Methods§

public function __construct(public PrivilegeObjectKind $object, list<Name> $schemas)

Parameters

$objectPrivilegeObjectKindThe kind: tables, sequences, functions, procedures or routines
$schemaslist<Name>The schemas in the order written, at least one
Calls 5
public function object(): PrivilegeObjectKind

Answers the kind of the objects.

Test cases 1
public function deriveTarget(Derivation $derivation, array $privileges): void

Derives nothing: the objects of the schemas are known when the statement runs.

Parameters

$derivationDerivation
$privilegesarray
public function render(Output $out): void

Writes ALL, the plural of the kind, IN SCHEMA and the schemas.

Parameters

$outOutput
Calls 4

Test cases 4§

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 2

Relations§

Instantiated in 1
Type checks 1