classProcedureCall
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.
$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> $argumentspublic QualifiedName $procedureMethods§
public function __construct(public QualifiedName $procedure, list<Scalar> $arguments = [])Parameters
$procedure | QualifiedName | The procedure name with its optional database |
$arguments | list<Scalar> | The arguments |
Calls 3
- static-call Check::input() line 46
- static-call Check::listOf() line 47
- class-const Scalar::class() line 47
public function deriveStatement(Derivation $derivation): voidDerives the arguments where no relation is visible; the statement records no rows.
Parameters
$derivation | Derivation |
Calls 2
- method-call Derivation::scalar() line 56
- method-call Derivation::environment() line 56
public function render(Output $out): voidWrites the statement; the parentheses are written when there are arguments.
Parameters
$out | Output |
Calls 5
- method-call Output::keyword() line 65
- method-call Output::name() line 67
- class-const NameUse::Qualifier() line 67
- class-const NameUse::Routine() line 69
- method-call Output::glue() line 71
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.