classResultSelect
final class ResultSelect
Restricted visibility: declared "@visibility ZtdQuery\Platform\MySql". Code outside that scope must not name this declaration.
Builds DELETE result projections from resolved targets and parsed query clauses.
Methods§
public function buildProjection(
DeleteStatement $stmt,
string $originalSql,
array<int, string> $columns,
list<MultiTableMutationTarget> $targets = [],
): array{sql: string, table: string, tables: array<string, array{alias: string}>}Parameters
$stmt | DeleteStatement | |
$originalSql | string | |
$columns | array<int, string> | |
$targets | list<MultiTableMutationTarget> |
Returns
array{sql: string, table: string, tables: array<string, array{alias: string}>}Throws
RuntimeExceptionTest cases 1
Called from 1
Calls 9
- method-call ResultSelect::primaryTarget() line 32
- function-call
preg_matchline 33 - new
RuntimeExceptionline 34 - method-call ResultSelect::resolvedTables() line 36
- method-call ResultSelect::selectList() line 38
- method-call TargetProjection::multiTableSelectList() line 39
- new TargetProjection line 39
- method-call ResultSelect::sourceClause() line 40
- method-call ResultSelect::suffix() line 40
public function primaryTarget(DeleteStatement $stmt): array{table: string, alias: string, aliases: array<string, string>}Parameters
$stmt | DeleteStatement |
Returns
array{table: string, alias: string, aliases: array<string, string>}Throws
RuntimeExceptionTest cases 1
Called from 1
Calls 4
- static-call ExpressionNames::table() line 52
- new
RuntimeExceptionline 65 - static-call ExpressionNames::alias() line 67
- method-call ResultSelect::namedTarget() line 70
public function namedTarget(DeleteStatement $stmt, string $alias): ?stringResolve aliases in FROM, JOIN and USING precedence, skipping empty matches.
Parameters
$stmt | DeleteStatement | |
$alias | string |
Returns
?stringTest cases 1
Called from 1
Calls 2
- static-call ExpressionNames::alias() line 93
- static-call ExpressionNames::table() line 96
public function sourceClause(DeleteStatement $stmt): stringUSING replaces the FROM list while the parsed JOIN clauses remain attached.
Parameters
$stmt | DeleteStatement |
Returns
stringTest cases 1
Called from 1
public function suffix(DeleteStatement $stmt, string $originalSql): stringPreserve the original WHERE expression and parsed ordering and limit clauses.
Parameters
$stmt | DeleteStatement | |
$originalSql | string |
Returns
stringTest cases 1
Called from 1
Calls 5
- method-call DmlWhereClauseExtractor::extract() line 126
- new DmlWhereClauseExtractor line 126
- static-call
OrderKeyword::build()line 130 - function-call
implodeline 132 - static-call
Limit::build()line 133
public function selectList(string $alias, array<int, string> $columns): stringParameters
$alias | string | |
$columns | array<int, string> |
Returns
stringTest cases 1
Called from 1
Calls 1
- function-call
implodeline 149
public function resolvedTables(
DeleteStatement $stmt,
array{table: string, alias: string, aliases: array<string, string>} $target,
): array<string, array{alias: string}>Parameters
$stmt | DeleteStatement | |
$target | array{table: string, alias: string, aliases: array<string, string>} |
Returns
array<string, array{alias: string}>Test cases 1
Called from 1
Calls 2
- method-call TargetProjection::resolveAliasToTable() line 163
- new TargetProjection line 163
Test cases 14§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 7
Other tests reaching this symbol 7
MySqlSessionFactoryTestcallsMySqlRewriterTestcallsStatementRewriterTestcallsDeleteTransformerTestcallsMySqlTransformerTestcallsRowMutationResolverTestcallsMySqlMutationResolverTestcalls