sql_generation: Add support for DROP INDEX

This commit is contained in:
Pekka Enberg
2025-09-09 18:57:41 +03:00
parent b572366a2b
commit 74c14efdfa
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)]
pub struct DropIndex {
pub index_name: String,
}
impl std::fmt::Display for DropIndex {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DROP INDEX {}", self.index_name)
}
}

View File

@@ -2,6 +2,7 @@ pub use create::Create;
pub use create_index::CreateIndex;
pub use delete::Delete;
pub use drop::Drop;
pub use drop_index::DropIndex;
pub use insert::Insert;
pub use select::Select;
@@ -9,6 +10,7 @@ pub mod create;
pub mod create_index;
pub mod delete;
pub mod drop;
pub mod drop_index;
pub mod insert;
pub mod predicate;
pub mod select;