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

Functions, procedures or routines named as the objects of a GRANT or REVOKE.

Each is named with or without its argument types. Routines are not declarations a context holds, so the signatures are not resolved; the expressions inside their argument types are derived. Source: https://www.postgresql.org/docs/17/sql-grant.html.

Reading the function of a grantdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('GRANT EXECUTE ON FUNCTION app.total(int4) TO joe');
    $operation->statement->target->signatures[0]->name->last()->value // => 'total'

Properties§

public non-empty-list<RoutineSignature> $signatures

Methods§

public function __construct(
    public PrivilegeObjectKind $object,
    list<RoutineSignature> $signatures,
)

Parameters

$objectPrivilegeObjectKindThe kind: functions, procedures or routines
$signatureslist<RoutineSignature>The signatures in the order written, at least one
Calls 7
public function object(): PrivilegeObjectKind

Answers the kind of the objects.

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

Derives the expressions inside the argument types.

Parameters

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

Writes the kind and the signatures.

Parameters

$outOutput
Calls 1

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 1