final class Splitter
Restricted visibility: declared "@visibility SqlSemantics\Platform\Sqlite". 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
Test cases 4
Called from 1
Calls 5

Private surface 1§

Implementation details, listed for orientation only.

private SqlParser $parser

Test cases 4§

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

Dedicated tests 4

Relations§

Instantiated in 1
Method calls 1