summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2019-12-09 20:17:41 +0000
committerevergreen <evergreen@mongodb.com>2019-12-09 20:17:41 +0000
commitb7a300db322cad07c305f287d1f06540c783a313 (patch)
tree4d9c3fb97a1c108ef3063ce174f16542b19e5bbb
parent9cb1bd53f83c84e1e4e0b19a8572d09a0d5c137f (diff)
downloadmongo-b7a300db322cad07c305f287d1f06540c783a313.tar.gz
SERVER-37062 db.watch does not show up in autocomplete or help
(cherry picked from commit b85b159f44e155ea05b456552a1cd5782a7d7850)
-rw-r--r--jstests/core/autocomplete.js1
-rw-r--r--src/mongo/shell/db.js7
2 files changed, 4 insertions, 4 deletions
diff --git a/jstests/core/autocomplete.js b/jstests/core/autocomplete.js
index 6511292a8d3..29509b951b9 100644
--- a/jstests/core/autocomplete.js
+++ b/jstests/core/autocomplete.js
@@ -24,6 +24,7 @@
// Verify we have some methods we added.
assert.contains('db.adminCommand(', db_stuff);
assert.contains('db.runCommand(', db_stuff);
+ assert.contains('db.watch(', db_stuff);
// Verify we enumerate collections.
assert.contains('db.auto_complete_coll', db_stuff);
diff --git a/src/mongo/shell/db.js b/src/mongo/shell/db.js
index 408ecbf2aa1..8107e4be4f1 100644
--- a/src/mongo/shell/db.js
+++ b/src/mongo/shell/db.js
@@ -651,7 +651,8 @@ var DB;
print("\tdb.shutdownServer()");
print("\tdb.stats()");
print("\tdb.version() current version of the server");
-
+ print("\tdb.watch() - opens a change stream cursor for a database to report on all " +
+ " changes to its non-system collections.");
return __magicNoPrint;
};
@@ -794,7 +795,6 @@ var DB;
* </p>
*/
DB.prototype.groupeval = function(parmsObj) {
-
var groupFunction = function() {
var parms = args[0];
var c = db[parms.ns].find(parms.cond || {});
@@ -1404,7 +1404,7 @@ var DB;
};
/* Loads any scripts contained in system.js into the client shell.
- */
+ */
DB.prototype.loadServerScripts = function() {
var global = Function('return this')();
this.system.js.find().forEach(function(u) {
@@ -2006,5 +2006,4 @@ var DB;
return this._session;
};
})(Object.prototype.hasOwnProperty);
-
}());