classNamedObjectsTarget
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.
$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> $namespublic PrivilegeObjectKind $objectMethods§
public function __construct(public PrivilegeObjectKind $object, list<Name> $names)Parameters
$object | PrivilegeObjectKind | The kind, one whose objects have unqualified names |
$names | list<Name> | The names in the order written, at least one |
Calls 5
- static-call Check::input() line 46
- function-call
in_arrayline 46 - class-const NamedObjectsTarget::KINDS() line 46
- static-call Check::listOf() line 47
- class-const Name::class() line 47
public function object(): PrivilegeObjectKindAnswers the kind of the objects.
Returns
Test cases 1
public function deriveTarget(Derivation $derivation, array $privileges): voidDerives nothing: the names are not resolved.
Parameters
$derivation | Derivation | |
$privileges | array |
public function render(Output $out): voidWrites the kind and the names.
Parameters
$out | Output |
Calls 5
- method-call Output::keyword() line 70
- function-call
explodeline 70 - method-call Output::symbol() line 73
- method-call Output::name() line 75
- class-const NameUse::Column() line 75
Test cases 6§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.