classSourceRelations
final class SourceRelations
Finds the relations of the source query of INSERT ... SELECT that ON DUPLICATE KEY UPDATE may refer to.
Rule: MYSQL-INSERT-SOURCE-001. When the source is one query block without GROUP BY, the values of ON DUPLICATE KEY UPDATE may refer to the columns of the tables, derived tables and table functions of its FROM clause; a set operation offers none. The occurrences are the ones the source query has derived, with the shapes recorded for them. Terminates: an explicit work stack over the finite FROM tree. Source: https://dev.mysql.com/doc/refman/8.4/en/insert-on-duplicate.html. Status: Implemented.
Methods§
public function visible(Query $source, Derivation $derivation): list<VisibleRelation>Answers the relations of the FROM clause of a derived source query.
Parameters
$source | Query | |
$derivation | Derivation |
Returns
list<VisibleRelation>Called from 1
Calls 4
- method-call Derivation::facts() line 46
- function-call
array_shiftline 50 - method-call SourceRelations::members() line 51
- new VisibleRelation line 61
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.