classIterate
final class Iterate
implements ProgramStatement
uses Snapshot
Public API: explicitly declared with
@visibility public.ITERATE: starts the next pass of the loop that has the label.
The facts follow MYSQL-PROGRAM-FLOW-001. Source: https://dev.mysql.com/doc/refman/8.4/en/iterate.html.
$create = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE PROCEDURE p() again: LOOP ITERATE again; END LOOP');
[$create->statement->body->statements[0]->label->value, $create->facts->diagnostics] // => ['again', []]Properties§
public Name $labelMethods§
public function __construct(public Name $label)Parameters
$label | Name | The label of the enclosing statement |
public function deriveProgram(Derivation $derivation, ProgramScope $scope): voidChecks that an enclosing statement has the label.
Parameters
$derivation | Derivation | |
$scope | ProgramScope |
Calls 2
- method-call FlowFacts::jump() line 43
- new FlowFacts line 43
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 51
- class-const NameUse::Label() line 51
Test cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
IterateTestcalls