diff --git a/core/vdbe/builder.rs b/core/vdbe/builder.rs index de151d6be..a748f32b3 100644 --- a/core/vdbe/builder.rs +++ b/core/vdbe/builder.rs @@ -1,6 +1,7 @@ use std::{ cell::Cell, cmp::Ordering, + num::NonZero, rc::{Rc, Weak}, sync::Arc, }; @@ -38,7 +39,8 @@ pub struct ProgramBuilder { pub parameters: Parameters, pub result_columns: Vec, pub table_references: Vec, - // Index of the referenced insert value to maintain ordering of paramaterized values + // Indexes of the referenced insert values to maintain ordering of paramaters + pub param_positions: Option)>>, pub current_col_idx: Option, } @@ -97,6 +99,7 @@ impl ProgramBuilder { parameters: Parameters::new(), result_columns: Vec::new(), table_references: Vec::new(), + param_positions: None, current_col_idx: None, } } @@ -110,6 +113,12 @@ impl ProgramBuilder { span } + pub fn set_param_remap(&mut self, remap: Option>>) { + if let Some(remap) = remap { + self.parameters.set_remap(remap); + } + } + /// End the current constant span. The last instruction that was emitted is the last /// instruction in the span. pub fn constant_span_end(&mut self, span_idx: usize) {