final class SourceRelations
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.

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

$sourceQuery
$derivationDerivation

Returns

Called from 1
Calls 4
public function members(Relation $relation): list<Relation>|null

Answers the relations a composite relation is made of, or null for a leaf.

Parameters

$relationRelation

Returns

list<Relation>|null
Test cases 1
Called from 1

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 1
Method calls 1