diff options
Diffstat (limited to 'src/mongo/shell/db.js')
-rw-r--r-- | src/mongo/shell/db.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/shell/db.js b/src/mongo/shell/db.js index 9dc7d8635bb..4c0c7df6a15 100644 --- a/src/mongo/shell/db.js +++ b/src/mongo/shell/db.js @@ -595,6 +595,7 @@ DB.prototype.help = function() { "\tdb.getWriteConcern() - returns the write concern used for any operations on this db, inherited from server object if set"); print("\tdb.hostInfo() get details about the server's host"); print("\tdb.isMaster() check replica primary status"); + print("\tdb.hello() check replica primary status"); print("\tdb.killOp(opid) kills the current operation in the db"); print("\tdb.listCommands() lists all the db commands"); print("\tdb.loadServerScripts() loads all the scripts in db.system.js"); @@ -927,6 +928,10 @@ DB.prototype.isMaster = function() { return this.runCommand("isMaster"); }; +DB.prototype.hello = function() { + return this.runCommand("hello"); +}; + var commandUnsupported = function(res) { return (!res.ok && (res.errmsg.startsWith("no such cmd") || res.errmsg.startsWith("no such command") || |