mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-09 02:04:22 +01:00
Fix unclear comments in translator
This commit is contained in:
@@ -2159,7 +2159,7 @@ pub fn translate_expr(
|
||||
// this value into the proper order.
|
||||
let index = program.parameters.push(name);
|
||||
if let Some(ref mut indicies) = &mut program.param_positions {
|
||||
// index of the parameter in the inserted values + index of the parameter relative
|
||||
// (value_index, parameter_index)
|
||||
indicies.push((program.current_col_idx.unwrap_or(index.get()), index));
|
||||
}
|
||||
program.emit_insn(Insn::Variable {
|
||||
|
||||
@@ -648,6 +648,7 @@ fn populate_column_registers(
|
||||
// if there are any parameter positions, we sort them by the value_index position
|
||||
// to ensure we are binding the parameters to the proper index later on
|
||||
if let Some(ref mut params) = program.param_positions.as_mut() {
|
||||
// sort the tuples by the value_index position, leaving the param_index in right order.
|
||||
params.sort_by_key(|(val_pos, _)| *val_pos);
|
||||
let remap = params
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user