feat(mongodb): support generic runCommand execution

This commit is contained in:
Guoyu Su authored and GitHub committed 2026-08-12 21:05:13 +08:00
1 parent 2d00620fac
commit 9b24d962bb
27 files changed
+580 -18

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ export const MONGO_SHELL_COMMAND_HINT =
"Use MongoDB shell-style commands, for example: db.collection.find({}).limit(100), " +
"db.collection.aggregate([]), db.collection.aggregate([], { explain: true }), " +
'db.version(), db.collection.countDocuments({}), db.collection.distinct("field"), ' +
"db.collection.getIndexes(), db.collection.createIndex({...}), db.createUser({...}), " +
"db.collection.getIndexes(), db.collection.createIndex({...}), db.createUser({...}), db.runCommand({...}), " +
"or db.collection.insertOne({...}).";
const PIPELINE_MUST_BE_ARRAY =