classIndexHintTokens
final class IndexHintTokens
Restricted visibility: declared "@visibility ZtdQuery\Platform\Sqlite". Code outside that scope must not name this declaration.
Locates index hints following a table reference and optional alias.
Methods§
public static function hintRange(
list<SqlToken> $tokens,
int $index,
): array{start: int, end: int}|nullParameters
$tokens | list<SqlToken> | |
$index | int |
Returns
array{start: int, end: int}|nullTest cases 1
Called from 1
Calls 1
- static-call IndexHintTokens::identifierEndIndex() line 50
public static function tokenIndexAtOrAfter(list<SqlToken> $tokens, int $offset): intpublic static function skipAlias(list<SqlToken> $tokens, int $index): intParameters
$tokens | list<SqlToken> | |
$index | int |
Returns
intTest cases 1
Called from 1
Calls 2
- static-call IndexHintTokens::identifierEndIndex() line 85
- static-call IndexHintTokens::isSourceBoundary() line 88
public static function isSourceBoundary(SqlToken $token): boolLocates index hints following a table reference and optional alias.
Parameters
$token | SqlToken |
Returns
boolTest cases 1
Called from 1
Calls 1
- method-call SqlToken::isKeyword() line 105
public static function identifierEndIndex(list<SqlToken> $tokens, int $index): ?intParameters
$tokens | list<SqlToken> | |
$index | int |
Returns
?intTest cases 2
Called from 3
- static-call ZtdQuery\Platform\Sqlite\Rewrite\Index\IndexHintTokens::hintRange() packages/ztd-query-sqlite/src/Rewrite/Index/IndexHintTokens.php:50
- static-call ZtdQuery\Platform\Sqlite\Rewrite\Index\IndexHintTokens::skipAlias() packages/ztd-query-sqlite/src/Rewrite/Index/IndexHintTokens.php:85
- static-call ZtdQuery\Platform\Sqlite\Rewrite\Index\IndexHintTokens::skipAlias() packages/ztd-query-sqlite/src/Rewrite/Index/IndexHintTokens.php:92
Calls 3
- class-const SqlTokenKind::Word() line 122
- class-const SqlTokenKind::QuotedIdentifier() line 122
- class-const SqlTokenKind::Symbol() line 125
Test cases 14§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 5
IndexHintTokensTest::testHintRangeRecognizesBothSupportedFormscallsIndexHintTokensTest::testIdentifierEndIndexRequiresACompleteNamecallsIndexHintTokensTest::testIsSourceBoundaryRecognizesClauseKeywordscallsIndexHintTokensTest::testSkipAliasLeavesSourceClausesUntouchedcallsIndexHintTokensTest::testTokenIndexAtOrAfterUsesByteOffsetscalls
Other tests reaching this symbol 9
Relations§
Static calls 3
- static-call ZtdQuery\Platform\Sqlite\Rewrite\Index\SqliteIndexHintStripper::strip() packages/ztd-query-sqlite/src/Rewrite/Index/SqliteIndexHintStripper.php:35
- static-call ZtdQuery\Platform\Sqlite\Rewrite\Index\SqliteIndexHintStripper::strip() packages/ztd-query-sqlite/src/Rewrite/Index/SqliteIndexHintStripper.php:36
- static-call ZtdQuery\Platform\Sqlite\Rewrite\Index\SqliteIndexHintStripper::strip() packages/ztd-query-sqlite/src/Rewrite/Index/SqliteIndexHintStripper.php:37