fix(mongodb): support collation for find queries
This commit is contained in:
21 files changed
+373
-30
No files matched your search
@@ -57,6 +57,7 @@ pub async fn document_find_documents(
|
||||
filter: Option<String>,
|
||||
projection: Option<String>,
|
||||
sort: Option<String>,
|
||||
collation: Option<String>,
|
||||
execution_id: Option<String>,
|
||||
) -> Result<DocumentQueryResult, String> {
|
||||
let app = state.inner().clone();
|
||||
@@ -73,6 +74,7 @@ pub async fn document_find_documents(
|
||||
filter.as_deref(),
|
||||
projection.as_deref(),
|
||||
sort.as_deref(),
|
||||
collation.as_deref(),
|
||||
),
|
||||
)
|
||||
.await
|
||||
|
||||
@@ -60,6 +60,7 @@ struct MongoFindDocumentsRequest {
|
||||
filter: Option<String>,
|
||||
projection: Option<String>,
|
||||
sort: Option<String>,
|
||||
collation: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
@@ -1181,6 +1182,7 @@ async fn handle_mongo_find_documents_data(state: &Arc<AppState>, body: &str, str
|
||||
req.filter.as_deref(),
|
||||
req.projection.as_deref(),
|
||||
req.sort.as_deref(),
|
||||
req.collation.as_deref(),
|
||||
)
|
||||
.await
|
||||
{
|
||||
|
||||
@@ -110,6 +110,7 @@ pub async fn mongo_find_documents(
|
||||
filter: Option<String>,
|
||||
projection: Option<String>,
|
||||
sort: Option<String>,
|
||||
collation: Option<String>,
|
||||
execution_id: Option<String>,
|
||||
mcp_request: Option<bool>,
|
||||
) -> Result<MongoDocumentResult, String> {
|
||||
@@ -126,6 +127,7 @@ pub async fn mongo_find_documents(
|
||||
filter,
|
||||
projection,
|
||||
sort,
|
||||
collation,
|
||||
execution_id,
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in new issue
Block a user