classExpressionTokenDecoder
final class ExpressionTokenDecoder
Restricted visibility: declared "@visibility ZtdQuery\Platform\Sqlite". Code outside that scope must not name this declaration.
Decodes upsert expression tokens and describes unsupported syntax.
Methods§
public function __construct(private string $sql)Binds the collaborators used by this operation.
Parameters
$sql | string |
public function isSymbol(SqlToken $token, list<string> $symbols): boolParameters
$token | SqlToken | |
$symbols | list<string> |
Returns
boolTest cases 1
Called from 8
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ArithmeticExpressionParser::parseAdditive() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ArithmeticExpressionParser.php:30
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ArithmeticExpressionParser::parseMultiplicative() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ArithmeticExpressionParser.php:50
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ArithmeticExpressionParser::parseUnary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ArithmeticExpressionParser.php:74
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ComparisonExpressionParser::comparisonOperator() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ComparisonExpressionParser.php:44
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ComparisonExpressionParser::comparisonOperator() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ComparisonExpressionParser.php:49
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:35
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:38
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:100
Calls 2
- class-const SqlTokenKind::Symbol() line 31
- function-call
in_arrayline 31
public function isIdentifier(SqlToken $token): boolDecodes upsert expression tokens and describes unsupported syntax.
Parameters
$token | SqlToken |
Returns
boolTest cases 1
Called from 2
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:94
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:103
Calls 2
- class-const SqlTokenKind::Word() line 39
- class-const SqlTokenKind::QuotedIdentifier() line 43
public function identifier(SqlToken $token): stringDecodes upsert expression tokens and describes unsupported syntax.
Parameters
$token | SqlToken |
Returns
stringTest cases 1
Called from 2
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:98
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:110
Calls 3
- class-const SqlTokenKind::Word() line 51
- function-call
str_replaceline 57 - function-call
substrline 57
public function number(string $literal): int|floatDecodes upsert expression tokens and describes unsupported syntax.
Parameters
$literal | string |
Returns
int|floatTest cases 1
Called from 1
public function string(string $literal): stringDecodes upsert expression tokens and describes unsupported syntax.
Parameters
$literal | string |
Returns
stringTest cases 1
Called from 1
public function unsupported(): UnsupportedSqlExceptionDecodes upsert expression tokens and describes unsupported syntax.
Returns
Test cases 1
Called from 8
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ComparisonExpressionParser::comparisonOperator() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ComparisonExpressionParser.php:62
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:33
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:39
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::columnSource() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:81
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:92
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:95
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:104
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\SqliteUpsertExpressionParser::parse() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/SqliteUpsertExpressionParser.php:29
Calls 1
Private surface 1§
Implementation details, listed for orientation only.
private string $sqlTest cases 16§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
ExpressionTokenDecoderTest::testIdentifierDecodesEscapedQuotecallsExpressionTokenDecoderTest::testIsIdentifierRecognizesOnlyNamescallsExpressionTokenDecoderTest::testIsSymbolRequiresSymbolTokencallsExpressionTokenDecoderTest::testNumberPreservesNumericFamiliescallsExpressionTokenDecoderTest::testStringDecodesSqlEscapescallsExpressionTokenDecoderTest::testUnsupportedRetainsOriginalSqlcalls
Other tests reaching this symbol 10
SqliteRewriterTestcallsStatementRewriterTestcallsArithmeticExpressionParserTestcallsComparisonExpressionParserTestcallsLogicalExpressionParserTestcallsPrimaryExpressionParserTestcallsSqliteUpsertExpressionParserTestcallsInsertMutationResolverTestcallsSqliteMutationResolverTestcallsSqliteSessionFactoryTestcalls
Relations§
Instantiated in 22
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ArithmeticExpressionParser::parseAdditive() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ArithmeticExpressionParser.php:30
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ArithmeticExpressionParser::parseMultiplicative() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ArithmeticExpressionParser.php:50
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ArithmeticExpressionParser::parseUnary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ArithmeticExpressionParser.php:74
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ComparisonExpressionParser::comparisonOperator() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ComparisonExpressionParser.php:44
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ComparisonExpressionParser::comparisonOperator() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ComparisonExpressionParser.php:49
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ComparisonExpressionParser::comparisonOperator() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ComparisonExpressionParser.php:62
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:33
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:35
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:38
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:39
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:48
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:53
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::columnSource() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:81
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:92
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:94
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:95
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:98
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:100
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:103
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:104
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:110
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\SqliteUpsertExpressionParser::parse() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/SqliteUpsertExpressionParser.php:29
Method calls 22
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ArithmeticExpressionParser::parseAdditive() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ArithmeticExpressionParser.php:30
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ArithmeticExpressionParser::parseMultiplicative() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ArithmeticExpressionParser.php:50
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ArithmeticExpressionParser::parseUnary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ArithmeticExpressionParser.php:74
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ComparisonExpressionParser::comparisonOperator() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ComparisonExpressionParser.php:44
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ComparisonExpressionParser::comparisonOperator() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ComparisonExpressionParser.php:49
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\ComparisonExpressionParser::comparisonOperator() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/ComparisonExpressionParser.php:62
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:33
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:35
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:38
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:39
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:48
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parsePrimary() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:53
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::columnSource() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:81
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:92
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:94
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:95
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:98
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:100
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:103
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:104
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\PrimaryExpressionParser::parseColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/PrimaryExpressionParser.php:110
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\SqliteUpsertExpressionParser::parse() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/SqliteUpsertExpressionParser.php:29