(
scx: &StatementContext,
kind: MutationKind,
params: &Params,
query::ReadThenWritePlan {
id,
mut selection,
finishing,
assignments,
}: query::ReadT
| 156 | } |
| 157 | |
| 158 | pub fn plan_read_then_write( |
| 159 | scx: &StatementContext, |
| 160 | kind: MutationKind, |
| 161 | params: &Params, |
| 162 | query::ReadThenWritePlan { |
| 163 | id, |
| 164 | mut selection, |
| 165 | finishing, |
| 166 | assignments, |
| 167 | }: query::ReadThenWritePlan, |
| 168 | ) -> Result<Plan, PlanError> { |
| 169 | selection.bind_parameters_and_simplify_offset(scx, QueryLifetime::OneShot, params)?; |
| 170 | let mut assignments_outer = BTreeMap::new(); |
| 171 | for (idx, mut set) in assignments { |
| 172 | set.bind_parameters_and_simplify_offset(scx, QueryLifetime::OneShot, params)?; |
| 173 | let set = set.lower_uncorrelated(scx.catalog.system_vars())?; |
| 174 | assignments_outer.insert(idx, set); |
| 175 | } |
| 176 | |
| 177 | Ok(Plan::ReadThenWrite(ReadThenWritePlan { |
| 178 | id, |
| 179 | selection, |
| 180 | finishing, |
| 181 | assignments: assignments_outer, |
| 182 | kind, |
| 183 | returning: Vec::new(), |
| 184 | })) |
| 185 | } |
| 186 | |
| 187 | pub fn describe_select( |
| 188 | scx: &StatementContext, |
no test coverage detected