final class Call
    implements Statement
    uses Snapshot
Public API: explicitly declared with @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.

Reading the open result of a procedure calldoctest
$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']
Refusing a window calldoctest
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\InvalidConstruction

Properties§

Methods§

public function __construct(public FunctionCall $call)

Parameters

$callFunctionCallThe procedure name and its arguments
Calls 1
public function deriveStatement(Derivation $derivation): void

Derives the call and records the open row of the output parameters.

Parameters

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

Writes the request.

Parameters

$outOutput
Calls 1

Test cases 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Type declarations 1