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

Header Parser.

Methods§

public function __construct(private SqlLexerProfile $lexerProfile)

Configure the dependencies used by this operation.

Parameters

$lexerProfileSqlLexerProfile
public function findAsIndex(list<SqlToken> $tokens, int $start): ?int
public function topLevelTokens(string $sql): list<SqlToken>
public function contents(
    string $sql,
    int $statementOffset,
): array{leading: string, recursive: bool, body: string}

Split a validated WITH header into its original prefix and CTE definitions.

Parameters

$sqlstring
$statementOffsetint

Returns

array{leading: string, recursive: bool, body: string}
Test cases 1
Called from 2
Calls 3

Private surface 1§

Implementation details, listed for orientation only.

private SqlLexerProfile $lexerProfile

Test cases 20§

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

Dedicated tests 6
Other tests reaching this symbol 14

Relations§

Instantiated in 6
Method calls 7