From d0da7307be40e0ff915cb5e9abea3dfc088c78d6 Mon Sep 17 00:00:00 2001 From: Jussi Saurio Date: Tue, 15 Apr 2025 20:33:57 +0300 Subject: [PATCH] Index: add new field ephemeral: bool --- core/schema.rs | 3 +++ core/translate/index.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/core/schema.rs b/core/schema.rs index 0a5a8d80f..dd09671ab 100644 --- a/core/schema.rs +++ b/core/schema.rs @@ -692,6 +692,7 @@ pub struct Index { pub root_page: usize, pub columns: Vec, 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, }) } diff --git a/core/translate/index.rs b/core/translate/index.rs index de79aed23..55222e40f 100644 --- a/core/translate/index.rs +++ b/core/translate/index.rs @@ -62,6 +62,7 @@ pub fn translate_create_index( }) .collect(), unique: unique_if_not_exists.0, + ephemeral: false, }); // Allocate the necessary cursors: