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.

Reading the label of the statementdoctest
$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 $label

Methods§

public function __construct(public Name $label)

Parameters

$labelNameThe label of the enclosing statement
public function deriveProgram(Derivation $derivation, ProgramScope $scope): void

Checks that an enclosing statement has the label.

Parameters

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

Writes the statement.

Parameters

$outOutput
Calls 2

Test cases 4§

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

Dedicated tests 1
Other tests reaching this symbol 3

Relations§

Instantiated in 1