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

Checks and writes the statement lists of stored programs.

Rule: MYSQL-PROGRAM-SEQUENCE-001. A member of a statement list is a statement of the stored program language or any SQL statement; every member is written followed by a semicolon, as the grammar requires inside compound statements. Terminates: one pass over the list. Source: https://dev.mysql.com/doc/refman/8.4/en/begin-end.html. Status: Implemented.

Methods§

public function members(
    array<array-key, object|array<array-key, object|scalar|null>|scalar|null> $statements,
    int $minimum = 0,
): ($minimum is positive-int ? non-empty-list<ProgramStatement|Statement> : list<ProgramStatement|Statement>)

Narrows a constructor argument to a list of program statements and SQL statements.

Parameters

$statementsarray<array-key, object|array<array-key, object|scalar|null>|scalar|null>
$minimumint

Returns

($minimum is positive-int ? non-empty-list<ProgramStatement|Statement> : list<ProgramStatement|Statement>)

Throws

InvalidConstruction When a member is no statement, or the list is shorter than the minimum
Test cases 4
Called from 8
Calls 4
public function write(Output $out, list<Node> $statements): void

Writes the statements, each followed by a semicolon.

Parameters

$outOutput
$statementslist<Node>
Test cases 1
Called from 9
Calls 1

Test cases 7§

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

Dedicated tests 7

Relations§

Instantiated in 22
Method calls 22