classCall
final class Call
implements Statement
uses Snapshot
@visibility public.CALL name(arguments): a request to run a procedure.
Rule: PG-CALL-001. Mirrors PostgreSQL's CallStmt, which holds the call as a FuncCall. Only a name and plain or named arguments are a procedure call. Facts: the arguments are derived where no relation is visible; the call itself depends on the declaration of the procedure. A procedure with output parameters returns one row of them, so the returned row is open and names the procedure as the missing declaration. Termination: the arguments are derived once. Source: https://www.postgresql.org/docs/17/sql-call.html. Status: Implemented.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CALL app.p(1)');
[$operation->statement->call->name->last()->value, $operation->shape()->complete(), $operation->shape()->missing[0]->describe()] // => ['p', false, 'the signature of routine p']new \SqlSemantics\Platform\PostgreSql\Statement\Utility\Call(new \SqlSemantics\Platform\PostgreSql\Statement\Invocation\FunctionCall(new \SqlSemantics\Platform\PostgreSql\Statement\Name\DottedName([new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('p')]), [], false, false, false, [], false, null, new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('w'))) // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\InvalidConstructionProperties§
public FunctionCall $callMethods§
public function __construct(public FunctionCall $call)Parameters
$call | FunctionCall | The procedure name and its arguments |
Calls 1
- static-call Check::input() line 45
public function deriveStatement(Derivation $derivation): voidDerives the call and records the open row of the output parameters.
Parameters
$derivation | Derivation |
Calls 6
- method-call Derivation::scalar() line 53
- method-call Derivation::environment() line 53
- method-call Derivation::output() line 56
- new QueryFact line 56
- new OpenStar line 56
- new UndeclaredRoutine line 56
public function render(Output $out): voidTest cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.