classActionClause
final class ActionClause
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Action clause operations for PostgreSQL merge.
Methods§
public function parseClause(string $originalSql, string $clauseSql): PgSqlMergeClauseParse clause.
Parameters
$originalSql | string | |
$clauseSql | string |
Returns
Throws
Test cases 1
Called from 1
Calls 11
- function-call
rtrimline 25 - static-call SqlTokenStream::tokenize() line 26
- static-call PgSqlLexerProfile::create() line 26
- class-const PgSqlMergeMatchKind::Matched() line 28
- class-const PgSqlMergeMatchKind::NotMatched() line 31
- new UnsupportedSqlException line 36
- method-call BranchTokens::keywordIndexOutsideCase() line 44
- new BranchTokens line 44
- function-call
trimline 53 - function-call
substrline 53 - method-call ActionClause::action() line 64
public function parseAssignments(
string $originalSql,
string $actionSql,
list<SqlToken> $tokens,
): array<string, string>Parameters
$originalSql | string | |
$actionSql | string | |
$tokens | list<SqlToken> |
Returns
array<string, string>Throws
Test cases 1
Called from 1
Calls 10
- new UnsupportedSqlException line 76
- function-call
substrline 81 - static-call SqlTokenStream::tokenize() line 83
- static-call PgSqlLexerProfile::create() line 83
- method-call RelationTarget::isSymbol() line 87
- new RelationTarget line 87
- function-call
countline 91 - method-call RelationTarget::identifierName() line 98
- function-call
trimline 102 - function-call
array_key_existsline 106
public function parseInsert(
string $originalSql,
string $actionSql,
list<SqlToken> $tokens,
): array{columns: list<string>, values: list<string>}Parameters
$originalSql | string | |
$actionSql | string | |
$tokens | list<SqlToken> |
Returns
array{columns: list<string>, values: list<string>}Throws
Test cases 1
Called from 1
Calls 6
- method-call RelationTarget::isSymbol() line 127
- new RelationTarget line 127
- method-call ActionClause::parenthesizedList() line 128
- method-call ActionClause::insertColumns() line 129
- function-call
countline 136 - new UnsupportedSqlException line 137
public function parenthesizedList(
string $originalSql,
string $sql,
list<SqlToken> $tokens,
int $openIndex,
): array{items: list<string>, next: int}Parameters
$originalSql | string | |
$sql | string | |
$tokens | list<SqlToken> | |
$openIndex | int |
Returns
array{items: list<string>, next: int}Throws
Test cases 1
Called from 2
Calls 6
- method-call RelationTarget::isSymbol() line 187
- new RelationTarget line 187
- function-call
substrline 193 - static-call SqlTokenStream::tokenize() line 194
- static-call PgSqlLexerProfile::create() line 194
- new UnsupportedSqlException line 199
public function action(
string $originalSql,
string $actionSql,
PgSqlMergeMatchKind $matchKind,
?string $conditionSql,
): PgSqlMergeClauseResolves the action permitted by a MATCHED or NOT MATCHED branch.
Parameters
$originalSql | string | |
$actionSql | string | |
$matchKind | PgSqlMergeMatchKind | |
$conditionSql | ?string |
Returns
Throws
Test cases 1
Called from 1
Calls 13
- static-call SqlTokenStream::tokenize() line 207
- static-call PgSqlLexerProfile::create() line 207
- new UnsupportedSqlException line 210
- function-call
countline 215 - new PgSqlMergeClause line 216
- class-const PgSqlMergeActionKind::DoNothing() line 216
- class-const PgSqlMergeMatchKind::Matched() line 220
- class-const PgSqlMergeActionKind::Delete() line 221
- class-const PgSqlMergeActionKind::Update() line 227
- method-call ActionClause::parseAssignments() line 228
- class-const PgSqlMergeMatchKind::NotMatched() line 231
- method-call ActionClause::parseInsert() line 232
- class-const PgSqlMergeActionKind::Insert() line 237
public function insertColumns(string $originalSql, list<string> $items): list<string>Validates the unique identifier list in a MERGE INSERT action.
Parameters
$originalSql | string | |
$items | list<string> |
Returns
list<string>Throws
Test cases 1
Called from 1
Calls 7
- static-call SqlTokenStream::tokenize() line 257
- static-call PgSqlLexerProfile::create() line 257
- function-call
countline 258 - method-call RelationTarget::identifierName() line 258
- new RelationTarget line 258
- new UnsupportedSqlException line 260
- function-call
in_arrayline 262
Test cases 17§
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 11
PgSqlSessionFactoryTestcallsPgSqlRewriterTestcallsStatementRewriterTestcallsMatchConditionsTestcallsRowActionsTestcallsMergeTransformerTestcallsPgSqlTransformerTestcallsRowMutationResolverTestcallsPgSqlMutationResolverTestcallsPgSqlMergeParserTestcallsStatementPartsTestcalls