final class SqlToken
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

One token of a SQL statement, with the nesting it was found at.

Properties§

public string $text
public int $offset
public int $depth

Methods§

public function __construct(
    public SqlTokenKind $kind,
    public string $text,
    public int $offset,
    public int $depth,
)

Parameters

$kindSqlTokenKindWhat the token is
$textstringThe token exactly as written
$offsetintWhere the token starts in the statement
$depthintHow many unclosed parentheses enclose the token
public function keyword(): string
public function isTopLevelKeyword(string $keyword): bool

Whether the token is the given keyword at the outermost nesting level.

Parameters

$keywordstring

Returns

bool
Test cases 1
Calls 2

Test cases 15§

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

Dedicated tests 2
Other tests reaching this symbol 13

Relations§

Instantiated in 8
Method calls 1
Type declarations 3