final class ProcedureCall
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

CALL of a stored procedure with its arguments.

Rule: MYSQL-CALL-001. The arguments are derived where no relation is visible. The procedure is a stored routine, which the analysis context does not declare; whether the call returns result sets, and how many, depends on the procedure body, so the statement records no rows. CALL p and CALL p() are the same call. Terminates: one pass over the arguments. Source: https://dev.mysql.com/doc/refman/8.4/en/call.html. Status: Implemented.

Reading a procedure calldoctest
$call = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('CALL shop.refresh(1, @x)');
    [$call->statement->procedure->name->value, count($call->statement->arguments), $call->toString()] // => ['refresh', 2, 'CALL shop.refresh(1, @x)']

Properties§

public list<Scalar> $arguments
public QualifiedName $procedure

Methods§

public function __construct(public QualifiedName $procedure, list<Scalar> $arguments = [])

Parameters

$procedureQualifiedNameThe procedure name with its optional database
$argumentslist<Scalar>The arguments
Calls 3
public function deriveStatement(Derivation $derivation): void

Derives the arguments where no relation is visible; the statement records no rows.

Parameters

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

Writes the statement; the parentheses are written when there are arguments.

Parameters

$outOutput
Calls 5

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 1
Type declarations 1