Skip to main content

merge_query

Function merge_query 

Source
pub fn merge_query(merge: &Merge) -> Option<Query>
Expand description

What flows into a MERGE target’s columns, as a query lineage can trace; None when the MERGE is not understood.

Each WHEN clause becomes one arm of a UNION ALL selecting the values it assigns (every column it does not touch is NULL), from the USING source joined to the target on the ON condition, filtered by the clause’s own condition. INSERT ROW takes every column of the source; a DELETE clause assigns nothing but still reads its condition.