feat(mongodb): rename collections from sidebar

This commit is contained in:
onenewcode authored and GitHub committed 2026-07-21 17:08:27 +08:00
1 parent 809500fd52
commit 9a83b46f00
26 files changed
+1105 -93

No files matched your search

+12
View File
@@ -86,6 +86,18 @@ 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 mongo_rename_collection(
state: State<'_, Arc<AppState>>,
connection_id: String,
database: String,
collection: String,
new_name: String,
) -> Result<(), String> {
ensure_connection_writable(&state, &connection_id, "Rename collection").await?;
dbx_core::mongo_ops::mongo_rename_collection_core(&state, &connection_id, &database, &collection, &new_name).await
}
#[tauri::command]
#[allow(clippy::too_many_arguments)]
pub async fn mongo_find_documents(