fix(mongodb): support array filters in updates
This commit is contained in:
15 files changed
+170
-14
No files matched your search
@@ -134,6 +134,7 @@ struct MongoUpdateDocumentsRequest {
|
||||
filter_json: String,
|
||||
update_json: String,
|
||||
many: bool,
|
||||
options_json: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
@@ -722,6 +723,7 @@ async fn handle_mongo_update_documents_data(state: &Arc<AppState>, body: &str, s
|
||||
&req.filter_json,
|
||||
&req.update_json,
|
||||
req.many,
|
||||
req.options_json.as_deref(),
|
||||
)
|
||||
.await
|
||||
{
|
||||
|
||||
@@ -263,6 +263,7 @@ pub async fn mongo_update_documents(
|
||||
filter_json: String,
|
||||
update_json: String,
|
||||
many: bool,
|
||||
options_json: Option<String>,
|
||||
) -> Result<u64, String> {
|
||||
ensure_connection_writable(&state, &connection_id, "Update").await?;
|
||||
dbx_core::mongo_ops::mongo_update_documents_core(
|
||||
@@ -273,6 +274,7 @@ pub async fn mongo_update_documents(
|
||||
&filter_json,
|
||||
&update_json,
|
||||
many,
|
||||
options_json.as_deref(),
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user