classSqliteUpsertExpressionParser
final class SqliteUpsertExpressionParser
Parses supported upsert expressions with SQLite operator precedence.
Methods§
public function parse(string $sql, string $tableName): UpsertExpressionParses the supplied SQL into its supported structured representation.
Parameters
$sql | string | |
$tableName | string |
Returns
Throws
Test cases 5
SqliteUpsertExpressionParserTest::testParsesExcludedAndExistingReferencescallsSqliteUpsertExpressionParserTest::testParsesPredicatecallsSqliteUpsertExpressionParserTest::testParsesSqliteExpressionCasescallsSqliteUpsertExpressionParserTest::testRejectsMySqlValuesFunctioncallsSqliteUpsertExpressionParserTest::testUnescapesQuotedSqliteIdentifierscalls
Called from 3
- method-call ZtdQuery\Platform\Sqlite\Shadow\Mutation\Upsert\SqliteUpsertExpressionParser::parseIfSupported() packages/ztd-query-sqlite/src/Shadow/Mutation/Upsert/SqliteUpsertExpressionParser.php:41
- method-call ZtdQuery\Platform\Sqlite\Shadow\Resolution\InsertMutationResolver::resolveOnConflict() packages/ztd-query-sqlite/src/Shadow/Resolution/InsertMutationResolver.php:86
- method-call ZtdQuery\Platform\Sqlite\Shadow\Resolution\InsertMutationResolver::resolveOnConflict() packages/ztd-query-sqlite/src/Shadow/Resolution/InsertMutationResolver.php:102
Calls 8
- new ExpressionCursor line 22
- static-call SqlTokenStream::tokenize() line 25
- static-call SqliteLexerProfile::create() line 25
- method-call LogicalExpressionParser::parseOr() line 27
- new LogicalExpressionParser line 27
- function-call
countline 28 - method-call ExpressionTokenDecoder::unsupported() line 29
- new ExpressionTokenDecoder line 29
public function parseIfSupported(string $sql, string $tableName): ?UpsertExpressionReturns the parsed expression, or null for unsupported SQLite syntax.
Parameters
$sql | string | |
$tableName | string |
Returns
Test cases 2
Called from 2
- method-call ZtdQuery\Platform\Sqlite\Shadow\Resolution\InsertMutationResolver::resolveOnConflict() packages/ztd-query-sqlite/src/Shadow/Resolution/InsertMutationResolver.php:85
- method-call ZtdQuery\Platform\Sqlite\Shadow\Resolution\InsertMutationResolver::resolveOnConflict() packages/ztd-query-sqlite/src/Shadow/Resolution/InsertMutationResolver.php:101
Calls 1
- method-call SqliteUpsertExpressionParser::parse() line 41
Test cases 12§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 7
SqliteUpsertExpressionParserTest::testParseIfSupportedReturnsNullForUnsupportedFunctioncallsSqliteUpsertExpressionParserTest::testParsesExcludedAndExistingReferencescallsSqliteUpsertExpressionParserTest::testParsesPredicatecallsSqliteUpsertExpressionParserTest::testParsesSqliteExpressionCasescallsSqliteUpsertExpressionParserTest::testRejectsInvalidSqliteExpressioncallsSqliteUpsertExpressionParserTest::testRejectsMySqlValuesFunctioncallsSqliteUpsertExpressionParserTest::testUnescapesQuotedSqliteIdentifierscalls
Other tests reaching this symbol 5
SqliteRewriterTestcallsStatementRewriterTestcallsInsertMutationResolverTestcallsSqliteMutationResolverTestcallsSqliteSessionFactoryTestcalls
Relations§
Instantiated in 1
Method calls 4
- method-call ZtdQuery\Platform\Sqlite\Shadow\Resolution\InsertMutationResolver::resolveOnConflict() packages/ztd-query-sqlite/src/Shadow/Resolution/InsertMutationResolver.php:85
- method-call ZtdQuery\Platform\Sqlite\Shadow\Resolution\InsertMutationResolver::resolveOnConflict() packages/ztd-query-sqlite/src/Shadow/Resolution/InsertMutationResolver.php:86
- method-call ZtdQuery\Platform\Sqlite\Shadow\Resolution\InsertMutationResolver::resolveOnConflict() packages/ztd-query-sqlite/src/Shadow/Resolution/InsertMutationResolver.php:101
- method-call ZtdQuery\Platform\Sqlite\Shadow\Resolution\InsertMutationResolver::resolveOnConflict() packages/ztd-query-sqlite/src/Shadow/Resolution/InsertMutationResolver.php:102