fix(mongodb): support createUser shell commands

Closes #5639
This commit is contained in:
t8y2 committed 2026-08-09 15:51:04 +08:00
1 parent e7f496bf0b
commit 9e3013adf9
25 files changed
+481 -12

No files matched your search

+2 -1
View File
@@ -25,7 +25,8 @@ 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({...}), or db.collection.insertOne({...}).";
"db.collection.getIndexes(), db.collection.createIndex({...}), db.createUser({...}), " +
"or db.collection.insertOne({...}).";
const PIPELINE_MUST_BE_ARRAY =
"MongoDB aggregate pipeline must be a JSON array (for example [{ $match: {} }]).";