fix(mongodb): support collation for find queries
This commit is contained in:
21 files changed
+373
-30
No files matched your search
@@ -3536,7 +3536,7 @@ export const useQueryStore = defineStore("query", () => {
|
||||
if (!pagePlan) throw new Error(describeMongoCommandParseFailure(sourceStatement));
|
||||
// A stale request can point past an explicit .limit() bound. Keep
|
||||
// the backend call bounded so limit(0) cannot become unbounded.
|
||||
const result = await api.mongoFindDocuments(tab.connectionId, currentDatabase, mongoCommand.collection, pagePlan.requestSkip, Math.max(1, pagePlan.requestLimit), mongoCommand.filter, mongoCommand.projection, mongoCommand.sort, executionId);
|
||||
const result = await api.mongoFindDocuments(tab.connectionId, currentDatabase, mongoCommand.collection, pagePlan.requestSkip, Math.max(1, pagePlan.requestLimit), mongoCommand.filter, mongoCommand.projection, mongoCommand.sort, mongoCommand.collation, executionId);
|
||||
const documents = pagePlan.requestLimit === 0 ? [] : result.documents;
|
||||
const extendedDocuments = pagePlan.requestLimit === 0 ? [] : result.extended_documents;
|
||||
const totalIsExact = result.total_is_exact !== false;
|
||||
@@ -5046,7 +5046,7 @@ export const useQueryStore = defineStore("query", () => {
|
||||
if (!plan) throw new Error(QUERY_RESULT_EXPORT_UNSUPPORTED_ERROR);
|
||||
if (plan.requestLimit === 0) break;
|
||||
|
||||
const result = await api.mongoFindDocuments(tab.connectionId, tab.database, mongoCommand.collection, plan.requestSkip, plan.requestLimit, mongoCommand.filter, mongoCommand.projection, mongoCommand.sort, exportExecutionId);
|
||||
const result = await api.mongoFindDocuments(tab.connectionId, tab.database, mongoCommand.collection, plan.requestSkip, plan.requestLimit, mongoCommand.filter, mongoCommand.projection, mongoCommand.sort, mongoCommand.collation, exportExecutionId);
|
||||
const pageDocuments = result.documents.slice(0, plan.requestLimit);
|
||||
documents.push(...pageDocuments);
|
||||
|
||||
|
||||
Reference in new issue
Block a user