classPrimaryExpressionParser
final class PrimaryExpressionParser
Restricted visibility: declared "@visibility ZtdQuery\Platform\Sqlite". Code outside that scope must not name this declaration.
Parses parenthesized values and column references in upsert expressions.
Methods§
public function __construct(private ExpressionCursor $cursor)Binds the collaborators used by this operation.
Parameters
$cursor | ExpressionCursor |
public function parsePrimary(): UpsertExpressionParses parenthesized values and column references in upsert expressions.
Returns
Throws
Test cases 3
Called from 1
Calls 11
- method-call ExpressionTokenDecoder::unsupported() line 33
- new ExpressionTokenDecoder line 33
- method-call ExpressionTokenDecoder::isSymbol() line 35
- method-call LogicalExpressionParser::parseOr() line 37
- new LogicalExpressionParser line 37
- class-const SqlTokenKind::Number() line 45
- static-call UpsertExpression::literal() line 48
- method-call ExpressionTokenDecoder::number() line 48
- class-const SqlTokenKind::String() line 50
- method-call ExpressionTokenDecoder::string() line 53
- method-call PrimaryExpressionParser::parseColumn() line 65
public function columnSource(string $qualifier): UpsertColumnSourceParses parenthesized values and column references in upsert expressions.
Parameters
$qualifier | string |
Returns
Throws
Test cases 2
Called from 1
Calls 5
- function-call
strcasecmpline 74 - class-const UpsertColumnSource::Incoming() line 75
- class-const UpsertColumnSource::Existing() line 78
- method-call ExpressionTokenDecoder::unsupported() line 81
- new ExpressionTokenDecoder line 81
public function parseColumn(): UpsertExpressionConsumes an existing or EXCLUDED column reference.
Returns
Throws
Test cases 1
Called from 1
Calls 8
- method-call ExpressionTokenDecoder::unsupported() line 92
- new ExpressionTokenDecoder line 92
- method-call ExpressionTokenDecoder::isIdentifier() line 94
- method-call ExpressionTokenDecoder::identifier() line 98
- method-call ExpressionTokenDecoder::isSymbol() line 100
- static-call UpsertExpression::column() line 108
- method-call PrimaryExpressionParser::columnSource() line 109
- class-const UpsertColumnSource::Existing() line 114
Private surface 1§
Implementation details, listed for orientation only.
private ExpressionCursor $cursorTest cases 15§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
PrimaryExpressionParserTest::testColumnSourceDistinguishesTableAndExcludedcallsPrimaryExpressionParserTest::testColumnSourceRejectsUnrelatedQualifierscallsPrimaryExpressionParserTest::testParseColumnSelectsIncomingRowcallsPrimaryExpressionParserTest::testParsePrimaryDecodesStringLiteralcallsPrimaryExpressionParserTest::testParsePrimaryEvaluatesParenthesizedExpressioncallsPrimaryExpressionParserTest::testParsePrimaryPreservesNullcalls