Index: add new field ephemeral: bool

This commit is contained in:
Jussi Saurio
2025-04-15 20:33:57 +03:00
parent a6dccdd12c
commit d0da7307be
2 changed files with 4 additions and 0 deletions

View File

@@ -692,6 +692,7 @@ pub struct Index {
pub root_page: usize,
pub columns: Vec<IndexColumn>,
pub unique: bool,
pub ephemeral: bool,
}
#[allow(dead_code)]
@@ -741,6 +742,7 @@ impl Index {
root_page,
columns: index_columns,
unique,
ephemeral: false,
})
}
_ => todo!("Expected create index statement"),
@@ -783,6 +785,7 @@ impl Index {
root_page,
columns: index_columns,
unique: true, // Primary key indexes are always unique
ephemeral: false,
})
}

View File

@@ -62,6 +62,7 @@ pub fn translate_create_index(
})
.collect(),
unique: unique_if_not_exists.0,
ephemeral: false,
});
// Allocate the necessary cursors: