final class SqlIdentifierComponent

Reads one part of a name out of the tokens a statement was written as.

A name may be written bare or in whatever the dialect quotes identifiers with, and a quoted one carries escapes that are not part of the name. Both spellings answer the same name, and anything that is not a name at all answers nothing.

Methods§

public function at(
    list<SqlToken> $tokens,
    int $index,
    SqlLexerProfile $profile,
): array{string, int}|null

Reads the name written at a position, and says where reading it left off.

Parameters

$tokenslist<SqlToken>Tokens to read, with nothing insignificant left in
$indexintPosition to read at
$profileSqlLexerProfileWhat the dialect quotes identifiers with

Returns

array{string, int}|null The name and the position after it, or null where no name is written
Test cases 4
Called from 1
Calls 3

Test cases 5§

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 1

Relations§

Instantiated in 1
Method calls 1
Type declarations 1