feat(mongo): add whole-document JSON editing
This commit is contained in:
1 parent
68b1777aa4
commit
5bcad3adc6
24 files changed
+1277
-67
No files matched your search
@@ -85,9 +85,18 @@ pub async fn document_insert_document(
|
||||
database: String,
|
||||
collection: String,
|
||||
doc_json: String,
|
||||
routing: Option<String>,
|
||||
) -> Result<String, String> {
|
||||
ensure_connection_writable(&state, &connection_id, "Insert").await?;
|
||||
dbx_core::document_ops::insert_document_core(&state, &connection_id, &database, &collection, &doc_json).await
|
||||
dbx_core::document_ops::insert_document_core(
|
||||
&state,
|
||||
&connection_id,
|
||||
&database,
|
||||
&collection,
|
||||
&doc_json,
|
||||
routing.as_deref(),
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
|
||||
@@ -271,8 +271,17 @@ pub async fn mongo_insert_document(
|
||||
database: String,
|
||||
collection: String,
|
||||
doc_json: String,
|
||||
routing: Option<String>,
|
||||
) -> Result<String, String> {
|
||||
crate::commands::document_cmd::document_insert_document(state, connection_id, database, collection, doc_json).await
|
||||
crate::commands::document_cmd::document_insert_document(
|
||||
state,
|
||||
connection_id,
|
||||
database,
|
||||
collection,
|
||||
doc_json,
|
||||
routing,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
|
||||
Reference in new issue
Block a user