pub fn main_write_split(
mutate_plan: &MutatePlan,
_read_plan: &ReadPlanTree,
return_representation: bool,
handler: Option<&MediaHandler>,
dialect: &dyn SqlDialect,
) -> (SqlBuilder, SqlBuilder)Expand description
Build split mutation + aggregation statements for backends without DML-in-CTE support.
Returns (mutation, aggregation) where:
mutationis the bare INSERT/UPDATE/DELETE with RETURNINGaggregationis a SELECT that aggregates rows from_dbrst_muttemp table
The executor is responsible for:
- Creating
_dbrst_muttemp table from the mutation RETURNING rows - Running the aggregation SELECT