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

Objects with unqualified names as the objects of a GRANT or REVOKE: databases, schemas, tablespaces, languages, foreign-data wrappers or foreign servers.

None of these is a declaration a context holds, so the names are kept and not resolved. Source: https://www.postgresql.org/docs/17/sql-grant.html.

Reading the schemas of a grantdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('GRANT USAGE ON SCHEMA app, audit TO joe');
    $operation->statement->target->names[1]->value // => 'audit'

Constants§

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

The kinds whose objects have unqualified names.

Properties§

public non-empty-list<Name> $names

Methods§

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

Parameters

$objectPrivilegeObjectKindThe kind, one whose objects have unqualified names
$nameslist<Name>The names 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 names are not resolved.

Parameters

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

Writes the kind and the names.

Parameters

$outOutput
Calls 5

Test cases 6§

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 4

Relations§

Instantiated in 1