final class SqlTriviaReader

Reads what carries no meaning of its own: whitespace and comments.

These are kept rather than dropped so that a statement can be written back out exactly as it came in. A run of whitespace is one lexeme, and so is a whole comment, however long it runs.

Methods§

public function __construct(private SqlBlockCommentReader $blockComments = new \ZtdQuery\Sql\Reader\SqlBlockCommentReader())

Creates the trivia reader from what reads a block comment.

Parameters

$blockCommentsSqlBlockCommentReaderWhat reads a block comment
Calls 1
public function readAt(string $sql, int $offset, SqlLexerProfile $profile): SqlLexeme|null

Private surface 1§

Implementation details, listed for orientation only.

private SqlBlockCommentReader $blockComments = new \ZtdQuery\Sql\Reader\SqlBlockCommentReader()

Test cases 9§

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

Dedicated tests 5
Other tests reaching this symbol 4

Relations§

Instantiated in 1
Method calls 1
Type declarations 1