classClauseTokens
final class ClauseTokens
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Clause tokens operations for PostgreSQL partition.
Methods§
public function parenthesizedValues(
string $sql,
list<SqlToken> $tokens,
int $openIndex,
): array{values: list<string>, next: int}|nullParameters
$sql | string | |
$tokens | list<SqlToken> | |
$openIndex | int |
Returns
array{values: list<string>, next: int}|nullTest cases 1
Called from 3
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\BoundPredicate::rangePredicate() packages/ztd-query-postgres/src/Sql/Partition/BoundPredicate.php:28
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\BoundPredicate::rangePredicate() packages/ztd-query-postgres/src/Sql/Partition/BoundPredicate.php:37
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\BoundPredicate::listPredicate() packages/ztd-query-postgres/src/Sql/Partition/BoundPredicate.php:68
Calls 4
- method-call ClauseTokens::closingParenthesisIndex() line 25
- function-call
substrline 31 - static-call SqlTokenStream::tokenize() line 32
- static-call PgSqlLexerProfile::create() line 32
public function closingParenthesisIndex(list<SqlToken> $tokens, int $openIndex): ?intParameters
$tokens | list<SqlToken> | |
$openIndex | int |
Returns
?intTest cases 1
Called from 2
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\ClauseTokens::parenthesizedValues() packages/ztd-query-postgres/src/Sql/Partition/ClauseTokens.php:25
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseKey() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:46
Calls 1
- method-call ClauseTokens::isSymbol() line 46
public function keywordPairIndex(list<SqlToken> $tokens, string $first, string $second): ?intParameters
$tokens | list<SqlToken> | |
$first | string | |
$second | string |
Returns
?intTest cases 1
Called from 4
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseKey() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:26
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parentTable() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:68
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseRelation() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:83
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseRelation() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:93
public function keywordIndex(list<SqlToken> $tokens, string $keyword): ?intpublic function qualifiedIdentifierAt(
SqlTokenStream $stream,
list<SqlToken> $tokens,
int $index,
): array{name: string, next: int}|nullParameters
$stream | SqlTokenStream | |
$tokens | list<SqlToken> | |
$index | int |
Returns
array{name: string, next: int}|nullTest cases 1
Called from 3
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\ClauseTokens::qualifiedIdentifierAt() packages/ztd-query-postgres/src/Sql/Partition/ClauseTokens.php:126
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parentTable() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:73
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseRelation() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:87
Calls 7
- function-call
in_arrayline 112 - class-const SqlTokenKind::Word() line 112
- class-const SqlTokenKind::QuotedIdentifier() line 112
- method-call SqlTokenStream::identifierAt() line 115
- function-call
strtolowerline 120 - method-call ClauseTokens::isSymbol() line 124
- method-call ClauseTokens::qualifiedIdentifierAt() line 126
public function isSymbol(SqlToken $token, string $symbol): boolIs symbol.
Parameters
$token | SqlToken | |
$symbol | string |
Returns
boolTest cases 1
Called from 3
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\ClauseTokens::closingParenthesisIndex() packages/ztd-query-postgres/src/Sql/Partition/ClauseTokens.php:46
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\ClauseTokens::closingParenthesisIndex() packages/ztd-query-postgres/src/Sql/Partition/ClauseTokens.php:54
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\ClauseTokens::qualifiedIdentifierAt() packages/ztd-query-postgres/src/Sql/Partition/ClauseTokens.php:124
Calls 1
- class-const SqlTokenKind::Symbol() line 142
Test cases 21§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
Other tests reaching this symbol 15
PgSqlSessionFactoryTestcallsTableContextTestcallsPgSqlRewriterTestcallsStatementRewriterTestcallsTableFieldsTestcallsPgSqlPartitionReflectorTestcallsPgSqlSchemaParserTestcallsPgSqlSchemaReflectorTestcallsPartitionKeysTestcallsSchemaInitializerTestcallsRowMutationResolverTestcallsTableMutationResolverTestcallsPgSqlMutationResolverTestcallsBoundPredicateTestcallsPgSqlPartitionParserTestcalls
Relations§
Instantiated in 11
- new ZtdQuery\Platform\Postgres\Sql\Partition\BoundPredicate::rangePredicate() packages/ztd-query-postgres/src/Sql/Partition/BoundPredicate.php:28
- new ZtdQuery\Platform\Postgres\Sql\Partition\BoundPredicate::rangePredicate() packages/ztd-query-postgres/src/Sql/Partition/BoundPredicate.php:37
- new ZtdQuery\Platform\Postgres\Sql\Partition\BoundPredicate::listPredicate() packages/ztd-query-postgres/src/Sql/Partition/BoundPredicate.php:68
- new ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseKey() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:26
- new ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseKey() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:46
- new ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parentTable() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:68
- new ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parentTable() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:73
- new ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseRelation() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:83
- new ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseRelation() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:87
- new ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseRelation() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:92
- new ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseRelation() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:93
Method calls 11
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\BoundPredicate::rangePredicate() packages/ztd-query-postgres/src/Sql/Partition/BoundPredicate.php:28
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\BoundPredicate::rangePredicate() packages/ztd-query-postgres/src/Sql/Partition/BoundPredicate.php:37
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\BoundPredicate::listPredicate() packages/ztd-query-postgres/src/Sql/Partition/BoundPredicate.php:68
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseKey() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:26
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseKey() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:46
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parentTable() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:68
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parentTable() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:73
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseRelation() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:83
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseRelation() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:87
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseRelation() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:92
- method-call ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseRelation() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:93