final class SqlWordReader

Reads what is written plainly: a bare word or a number.

A bare word is a keyword or an unquoted identifier; nothing here tells them apart, because which words are keywords is not a question the reader has to answer. How far a number runs is the dialect's business, since exponents, hex and separators differ, so the profile measures it.

Methods§

public function readAt(string $sql, int $offset, SqlLexerProfile $profile): SqlLexeme|null

Answers what plain lexeme starts at an offset.

Parameters

$sqlstringThe statement, as written
$offsetintWhere to look
$profileSqlLexerProfileWhat the dialect spells things with

Returns

SqlLexeme|null The lexeme read there, or null when none starts there
Test cases 4
Called from 1
Calls 7

Test cases 8§

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

Dedicated tests 4
Other tests reaching this symbol 4

Relations§

Instantiated in 1
Method calls 1
Type declarations 1