classRoutineSignature
final class RoutineSignature
implements ObjectReference
uses Snapshot
Public API: explicitly declared with
@visibility public.A function, procedure or routine named with or without its argument list.
Mirrors PostgreSQL's ObjectWithArgs for function_with_argtypes. Without an argument list (args_unspecified) the name must identify one routine; an empty list names the routine without arguments. The argument types identify the routine; argument names and output arguments are written but do not take part in the lookup of a function. Source: https://www.postgresql.org/docs/17/sql-dropfunction.html.
$signature = new \SqlSemantics\Platform\PostgreSql\Statement\Routine\Signature\RoutineSignature(new \SqlSemantics\Platform\PostgreSql\Statement\Name\DottedName([new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('f')]));
$signature->arguments // => nullProperties§
public list<FunctionParameter>|null $argumentspublic DottedName $nameMethods§
public function __construct(
public DottedName $name,
list<FunctionParameter>|null $arguments = null,
)Parameters
$name | DottedName | The routine name |
$arguments | list<FunctionParameter>|null | The written arguments, without default values; null when no argument list is written |
Calls 3
- static-call Check::listOf() line 51
- class-const FunctionParameter::class() line 51
- static-call Check::input() line 53
public function deriveClause(Derivation $derivation, Environment $environment): voidDerives the type modifiers of the arguments.
Parameters
$derivation | Derivation | |
$environment | Environment |
Test cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Statement\Operator\FunctionMember::deriveClause() packages/sql-semantics-postgres/src/Statement/Operator/FunctionMember.php:55
- method-call SqlSemantics\Platform\PostgreSql\Statement\Routine\AlterRoutine::deriveStatement() packages/sql-semantics-postgres/src/Statement/Routine/AlterRoutine.php:59
public function render(Output $out): voidWrites the name and the argument list, if any.
Parameters
$out | Output |
Test cases 1
Calls 2
- method-call Output::node() line 72
- method-call Output::symbol() line 74
Test cases 8§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
Other tests reaching this symbol 5
Relations§
Instantiated in 4
- new SqlSemantics\Platform\PostgreSql\Lowering\Routine\SignatureRule::function() packages/sql-semantics-postgres/src/Lowering/Routine/SignatureRule.php:74
- new SqlSemantics\Platform\PostgreSql\Lowering\Routine\SignatureRule::function() packages/sql-semantics-postgres/src/Lowering/Routine/SignatureRule.php:75
- new SqlSemantics\Platform\PostgreSql\Lowering\Routine\SignatureRule::function() packages/sql-semantics-postgres/src/Lowering/Routine/SignatureRule.php:76
- new SqlSemantics\Platform\PostgreSql\Lowering\Routine\SignatureRule::function() packages/sql-semantics-postgres/src/Lowering/Routine/SignatureRule.php:77
Method calls 2
- method-call SqlSemantics\Platform\PostgreSql\Statement\Operator\FunctionMember::deriveClause() packages/sql-semantics-postgres/src/Statement/Operator/FunctionMember.php:55
- method-call SqlSemantics\Platform\PostgreSql\Statement\Routine\AlterRoutine::deriveStatement() packages/sql-semantics-postgres/src/Statement/Routine/AlterRoutine.php:59
Constant reads 1
Type checks 1
Type declarations 4
- type SqlSemantics\Platform\PostgreSql\Lowering\Routine\Routines packages/sql-semantics-postgres/src/Lowering/Routine/Routines.php:64
- type SqlSemantics\Platform\PostgreSql\Lowering\Routine\SignatureRule packages/sql-semantics-postgres/src/Lowering/Routine/SignatureRule.php:68
- type SqlSemantics\Platform\PostgreSql\Statement\Operator\FunctionMember packages/sql-semantics-postgres/src/Statement/Operator/FunctionMember.php:42
- type SqlSemantics\Platform\PostgreSql\Statement\Routine\AlterRoutine packages/sql-semantics-postgres/src/Statement/Routine/AlterRoutine.php:44