classInvocationRule
final class InvocationRule
Lowers DO, CALL, IMPORT TABLE and the prepared statement commands.
Rule: MYSQL-INVOCATION-LOWERING-001. Scope: do, do_stmt, call, opt_sp_cparam_list, opt_sp_cparams, sp_cparams, call_stmt, opt_paren_expr_list, import_stmt, prepare, prepare_src, execute, execute_using, execute_var_list, execute_var_ident, deallocate, deallocate_or_drop. The expressions of DO in MySQL 5.6 are select items without aliases. The parentheses of an empty argument list of CALL are noise (DmlNoise). Terminates: the parts are strict subtrees; lists are flattened by MYSQL-DML-LIST-001. Source: https://dev.mysql.com/doc/refman/8.4/en/do.html, https://dev.mysql.com/doc/refman/8.4/en/call.html, https://dev.mysql.com/doc/refman/8.4/en/import-table.html, https://dev.mysql.com/doc/refman/8.4/en/sql-prepared-statements.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
public function evaluation(Form $form): EvaluationLowers a node of do or do_stmt.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 5
- new Evaluation line 56
- function-call
array_mapline 56 - new SelectExpression line 56
- method-call Form::node() line 56
- static-call ImplementationGap::production() line 64
public function call(Form $form): ProcedureCallLowers a node of call or call_stmt.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 4
- static-call ImplementationGap::production() line 76
- new ProcedureCall line 79
- method-call Form::node() line 79
- method-call InvocationRule::arguments() line 79
public function arguments(Node $list): list<Scalar>Lowers the arguments of CALL: a node of opt_sp_cparam_list or opt_paren_expr_list.
Parameters
$list | Node |
Returns
list<Scalar>Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 4
- method-call Lowering::form() line 90
- static-call ImplementationGap::production() line 103
- method-call ListRule::items() line 106
- new ListRule line 106
public function import(Form $form): ImportTableLowers a node of import_stmt.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 3
- static-call ImplementationGap::production() line 124
- new ImportTable line 127
- method-call Form::node() line 127
Lowers a node of prepare, execute or deallocate.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 7
- method-call Lowering::form() line 139
- method-call Form::node() line 139
- new Prepare line 141
- static-call ImplementationGap::production() line 144
- new Execute line 147
- method-call InvocationRule::variables() line 147
- new Deallocate line 154
public function variables(Node $using): list<UserVariable>Lowers the variables of EXECUTE: a node of execute_using; an absent USING is empty.
Parameters
$using | Node |
Returns
list<UserVariable>Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 4
- method-call Lowering::form() line 168
- static-call ImplementationGap::production() line 173
- method-call ListRule::items() line 176
- new ListRule line 176
Private surface 1§
Implementation details, listed for orientation only.
private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
InvocationRuleTestcalls
Relations§
Instantiated in 4
- new SqlSemantics\Platform\MySql\Lowering\Dml\DmlRules::statement() packages/sql-semantics-mysql/src/Lowering/Dml/DmlRules.php:57
- new SqlSemantics\Platform\MySql\Lowering\Dml\DmlRules::statement() packages/sql-semantics-mysql/src/Lowering/Dml/DmlRules.php:58
- new SqlSemantics\Platform\MySql\Lowering\Dml\DmlRules::statement() packages/sql-semantics-mysql/src/Lowering/Dml/DmlRules.php:59
- new SqlSemantics\Platform\MySql\Lowering\Dml\DmlRules::statement() packages/sql-semantics-mysql/src/Lowering/Dml/DmlRules.php:60
Method calls 4
- method-call SqlSemantics\Platform\MySql\Lowering\Dml\DmlRules::statement() packages/sql-semantics-mysql/src/Lowering/Dml/DmlRules.php:57
- method-call SqlSemantics\Platform\MySql\Lowering\Dml\DmlRules::statement() packages/sql-semantics-mysql/src/Lowering/Dml/DmlRules.php:58
- method-call SqlSemantics\Platform\MySql\Lowering\Dml\DmlRules::statement() packages/sql-semantics-mysql/src/Lowering/Dml/DmlRules.php:59
- method-call SqlSemantics\Platform\MySql\Lowering\Dml\DmlRules::statement() packages/sql-semantics-mysql/src/Lowering/Dml/DmlRules.php:60