Store owned strings in InsertEmitCtx for borrow-checker reasons

This commit is contained in:
Jussi Saurio
2025-11-13 09:35:09 +02:00
parent 34978d0fde
commit 50fbd9a3a2

View File

@@ -94,7 +94,7 @@ pub struct InsertEmitCtx<'a> {
/// Index cursors we need to populate for this table
/// (idx name, root_page, idx cursor id)
pub idx_cursors: Vec<(&'a String, i64, usize)>,
pub idx_cursors: Vec<(String, i64, usize)>,
/// Context for if the insert values are materialized first
/// into a temporary table
@@ -146,7 +146,7 @@ impl<'a> InsertEmitCtx<'a> {
let mut idx_cursors = Vec::new();
for idx in indices {
idx_cursors.push((
&idx.name,
idx.name.clone(),
idx.root_page,
program.alloc_cursor_index(None, idx)?,
));