mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-08 09:44:21 +01:00
sql_generation: Add support for DROP INDEX
This commit is contained in:
12
sql_generation/model/query/drop_index.rs
Normal file
12
sql_generation/model/query/drop_index.rs
Normal 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)
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user