classRoutinesTarget
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.
$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> $signaturespublic PrivilegeObjectKind $objectMethods§
public function __construct(
public PrivilegeObjectKind $object,
list<RoutineSignature> $signatures,
)Parameters
$object | PrivilegeObjectKind | The kind: functions, procedures or routines |
$signatures | list<RoutineSignature> | The signatures in the order written, at least one |
Calls 7
- static-call Check::input() line 41
- function-call
in_arrayline 41 - class-const PrivilegeObjectKind::Function() line 41
- class-const PrivilegeObjectKind::Procedure() line 41
- class-const PrivilegeObjectKind::Routine() line 41
- static-call Check::listOf() line 42
- class-const RoutineSignature::class() line 42
public function object(): PrivilegeObjectKindAnswers the kind of the objects.
Returns
public function deriveTarget(Derivation $derivation, array $privileges): voidDerives the expressions inside the argument types.
Parameters
$derivation | Derivation | |
$privileges | array |
Calls 1
- method-call Derivation::environment() line 59
public function render(Output $out): voidWrites the kind and the signatures.
Parameters
$out | Output |
Calls 1
- method-call Output::keyword() line 68
Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.