feat(milvus): add database and collection deletion
This commit is contained in:
1 parent
db8f262c14
commit
439f2c2617
14 files changed
+309
-12
No files matched your search
@@ -86,6 +86,27 @@ pub async fn mongo_drop_collection(
|
||||
dbx_core::mongo_ops::mongo_drop_collection_core(&state, &connection_id, &database, &collection).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn vector_drop_database(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
connection_id: String,
|
||||
database: String,
|
||||
) -> Result<(), String> {
|
||||
ensure_connection_writable(&state, &connection_id, "Drop database").await?;
|
||||
dbx_core::schema::drop_vector_database_core(&state, &connection_id, &database).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn vector_drop_collection(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
connection_id: String,
|
||||
database: String,
|
||||
collection: String,
|
||||
) -> Result<(), String> {
|
||||
ensure_connection_writable(&state, &connection_id, "Drop collection").await?;
|
||||
dbx_core::schema::drop_vector_collection_core(&state, &connection_id, &database, &collection).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn mongo_rename_collection(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
|
||||
@@ -2006,6 +2006,8 @@ pub fn run() {
|
||||
commands::mongo_cmd::mongo_create_database,
|
||||
commands::mongo_cmd::mongo_drop_database,
|
||||
commands::mongo_cmd::mongo_drop_collection,
|
||||
commands::mongo_cmd::vector_drop_database,
|
||||
commands::mongo_cmd::vector_drop_collection,
|
||||
commands::mongo_cmd::mongo_rename_collection,
|
||||
commands::mongo_cmd::mongo_clone_collection,
|
||||
commands::docs::docs_collect_snapshot,
|
||||
|
||||
Reference in new issue
Block a user