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

Finds statement boundaries by asking the parser which prefixes are complete statements.

Methods§

public function __construct(private SqlParser $parser)

Parameters

$parserSqlParserThe parser of the language profile
public function split(string $sql): list<string>

Splits a script into statement texts, each ending with its own terminator.

Parameters

$sqlstring

Returns

list<string>

Throws

SourceException When the text after the last boundary is not a statement
Called from 1
Calls 5

Private surface 1§

Implementation details, listed for orientation only.

private SqlParser $parser

Relations§

Instantiated in 1
Method calls 1