classMySqlUpsertExpressionParser
final class MySqlUpsertExpressionParser
Implements the My Sql Upsert Expression Parser contract for MySQL.
Methods§
public function parse(
string $sql,
string $tableName,
?string $incomingAlias = null,
): UpsertExpressionParse for the supplied MySQL input.
Parameters
$sql | string | |
$tableName | string | |
$incomingAlias | ?string |
Returns
Throws
Test cases 6
MySqlUpsertExpressionParserTest::testParsesLiteralsPredicatesAndUnaryOperatorscallsMySqlUpsertExpressionParserTest::testParsesMySqlExpressionCasescallsMySqlUpsertExpressionParserTest::testParsesMySqlIncomingRowAliascallsMySqlUpsertExpressionParserTest::testParsesValuesAndExistingTableReferencescallsMySqlUpsertExpressionParserTest::testRejectsPostgreSqlIncomingQualifiercallsMySqlUpsertExpressionParserTest::testUnescapesQuotedIdentifiersAndMySqlStringscalls
Called from 2
- method-call ZtdQuery\Platform\MySql\Shadow\Mutation\Row\RowMutationResolver::resolveInsert() packages/ztd-query-mysql/src/Shadow/Mutation/Row/RowMutationResolver.php:180
- method-call ZtdQuery\Platform\MySql\Shadow\Mutation\Upsert\MySqlUpsertExpressionParser::parseIfSupported() packages/ztd-query-mysql/src/Shadow/Mutation/Upsert/MySqlUpsertExpressionParser.php:39
Calls 6
- static-call SqlTokenStream::tokenize() line 23
- static-call MySqlLexerProfile::create() line 23
- method-call ExpressionReader::parseOr() line 25
- new ExpressionReader line 25
- function-call
countline 26 - new UnsupportedSqlException line 27
public function parseIfSupported(
string $sql,
string $tableName,
?string $incomingAlias = null,
): ?UpsertExpressionParse If Supported for the supplied MySQL input.
Parameters
$sql | string | |
$tableName | string | |
$incomingAlias | ?string |
Returns
Test cases 2
Called from 1
Calls 1
- method-call MySqlUpsertExpressionParser::parse() line 39
Test cases 13§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 8
MySqlUpsertExpressionParserTest::testParseIfSupportedReturnsNullForUnsupportedFunctioncallsMySqlUpsertExpressionParserTest::testParsesLiteralsPredicatesAndUnaryOperatorscallsMySqlUpsertExpressionParserTest::testParsesMySqlExpressionCasescallsMySqlUpsertExpressionParserTest::testParsesMySqlIncomingRowAliascallsMySqlUpsertExpressionParserTest::testParsesValuesAndExistingTableReferencescallsMySqlUpsertExpressionParserTest::testRejectsInvalidMySqlExpressioncallsMySqlUpsertExpressionParserTest::testRejectsPostgreSqlIncomingQualifiercallsMySqlUpsertExpressionParserTest::testUnescapesQuotedIdentifiersAndMySqlStringscalls
Other tests reaching this symbol 5
MySqlSessionFactoryTestcallsMySqlRewriterTestcallsStatementRewriterTestcallsRowMutationResolverTestcallsMySqlMutationResolverTestcalls
Relations§
Instantiated in 1
Method calls 2
- method-call ZtdQuery\Platform\MySql\Shadow\Mutation\Row\RowMutationResolver::resolveInsert() packages/ztd-query-mysql/src/Shadow/Mutation/Row/RowMutationResolver.php:179
- method-call ZtdQuery\Platform\MySql\Shadow\Mutation\Row\RowMutationResolver::resolveInsert() packages/ztd-query-mysql/src/Shadow/Mutation/Row/RowMutationResolver.php:180