final class FlowRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.

Lowers the flow control statements of stored programs.

Rule: MYSQL-PROGRAM-FLOW-LOWERING-001. Scope: sp_proc_stmt_if, sp_if, sp_elseifs, case_stmt_specification, simple_case_stmt, searched_case_stmt, simple_when_clause_list, searched_when_clause_list, simple_when_clause, searched_when_clause, else_clause_opt, sp_labeled_control, sp_unlabeled_control, sp_opt_label, sp_proc_stmt_return, sp_proc_stmt_leave, sp_proc_stmt_iterate. The chain of ELSEIF rules is followed with a loop. Constructs: IfStatement, SimpleCase, SearchedCase, ConditionalBranch, Loop, WhileLoop, RepeatLoop, Leave, Iterate, ReturnStatement. Terminates: every child is a strict subtree; the ELSEIF chain and the lists are walked iteratively. Source: https://dev.mysql.com/doc/refman/8.4/en/flow-control-statements.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function labeled(Form $form): Loop|WhileLoop|RepeatLoop
public function jump(Form $form): ProgramStatement|Statement

Lowers RETURN, LEAVE or ITERATE: the form of sp_proc_stmt_return, sp_proc_stmt_leave or sp_proc_stmt_iterate.

Parameters

$formForm

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 5

Private surface 2§

Implementation details, listed for orientation only.

private const WHENS = ['simple_when_clause_list: simple_when_clause', 'simple_when_clause_list: simpl…
private Lowering $lowering

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 2
Method calls 6