Mongo.adminCommand helper

This commit is contained in:
Eliot Horowitz
2010-12-20 02:21:33 -05:00
parent 576ff830dc
commit 18fce96ec2
2 changed files with 8 additions and 0 deletions

View File

@@ -2282,6 +2282,10 @@ const StringData _jscode_raw_mongo =
"return res;\n"
"}\n"
"\n"
"Mongo.prototype.adminCommand = function( cmd ){\n"
"return this.getDB( \"admin\" ).runCommand( cmd );\n"
"}\n"
"\n"
"Mongo.prototype.getDBNames = function(){\n"
"return this.getDBs().databases.map(\n"
"function(z){\n"