feat(mongodb): support find explain in the SQL editor
This commit is contained in:
1 parent
2e85c8b55d
commit
a78fc48a7b
15 files changed
+290
-9
No files matched your search
@@ -6595,6 +6595,28 @@ export const useQueryStore = defineStore("query", () => {
|
||||
});
|
||||
break;
|
||||
}
|
||||
case "findExplain": {
|
||||
queryExecutionLog("info", "mongo-explain:start", { traceId, collection: mongoCommand.collection, database: currentDatabase });
|
||||
const plan = await api.mongoExplainFind(
|
||||
executionConnectionId,
|
||||
currentDatabase,
|
||||
mongoCommand.collection,
|
||||
{
|
||||
skip: mongoCommand.skip,
|
||||
limit: mongoCommand.limit,
|
||||
filter: mongoCommand.filter,
|
||||
projection: mongoCommand.projection,
|
||||
sort: mongoCommand.sort,
|
||||
collation: mongoCommand.collation,
|
||||
verbosity: mongoCommand.verbosity,
|
||||
},
|
||||
executionId,
|
||||
);
|
||||
allResults.push(markQueryResultRowsRaw(annotateMongoResult(mongoDocumentsToQueryResult([plan], performance.now() - commandStartedAt, 1))));
|
||||
mongoEditTarget = undefined;
|
||||
queryExecutionLog("info", "mongo-explain:done", { traceId, collection: mongoCommand.collection, database: currentDatabase, elapsed: elapsed() });
|
||||
break;
|
||||
}
|
||||
case "aggregate": {
|
||||
if (options?.mongoSafety) {
|
||||
const safety = evaluateMongoAggregateSafety(mongoCommand, options.mongoSafety);
|
||||
|
||||
Reference in new issue
Block a user