fix(elasticsearch): preserve legacy type on delete

This commit is contained in:
t8y2 committed 2026-08-01 13:43:54 +08:00
1 parent 288cc0687a
commit 78a61334a5
9 files changed
+85 -42

No files matched your search

+3 -1
View File
@@ -147,15 +147,17 @@ pub async fn document_delete_document(
collection: String,
id: String,
routing: Option<String>,
document_type: Option<String>,
) -> Result<u64, String> {
ensure_connection_writable(&state, &connection_id, "Delete").await?;
dbx_core::document_ops::delete_document_core(
dbx_core::document_ops::delete_document_core_with_type(
&state,
&connection_id,
&database,
&collection,
&id,
routing.as_deref(),
document_type.as_deref(),
)
.await
}
+10 -2
View File
@@ -467,8 +467,16 @@ pub async fn mongo_delete_document(
id: String,
routing: Option<String>,
) -> Result<u64, String> {
crate::commands::document_cmd::document_delete_document(state, connection_id, database, collection, id, routing)
.await
crate::commands::document_cmd::document_delete_document(
state,
connection_id,
database,
collection,
id,
routing,
None,
)
.await
}
#[tauri::command]