summaryrefslogtreecommitdiff
path: root/src/mongo/shell/query.js
diff options
context:
space:
mode:
authorjannaerin <golden.janna@gmail.com>2017-11-21 14:04:19 -0500
committerjannaerin <golden.janna@gmail.com>2017-11-27 09:37:49 -0500
commit41f53f9e5c671291acbe24cf1199fc6d89f9bead (patch)
tree22f3304c62f82b415d9fc5565baff579a4591d44 /src/mongo/shell/query.js
parent611220640b0fd32fcf81f47cdae6882a26bbac0b (diff)
downloadmongo-41f53f9e5c671291acbe24cf1199fc6d89f9bead.tar.gz
SERVER-31925 Remove QueryPlan shell object
Diffstat (limited to 'src/mongo/shell/query.js')
-rw-r--r--src/mongo/shell/query.js64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/mongo/shell/query.js b/src/mongo/shell/query.js
index 431c3aa9455..f13dc9e4ebf 100644
--- a/src/mongo/shell/query.js
+++ b/src/mongo/shell/query.js
@@ -60,9 +60,6 @@ DBQuery.prototype.help = function() {
print(
"\t.objsLeftInBatch() - returns count of docs left in current batch (when exhausted, a new getMore will be issued)");
print("\t.itcount() - iterates through documents and counts them");
- print(
- "\t.getQueryPlan() - get query plans associated with shape. To get more info on query plans, " +
- "call getQueryPlan().help().");
print("\t.pretty() - pretty print each document, possibly over multiple lines");
};
@@ -563,13 +560,6 @@ DBQuery.prototype.shellPrint = function() {
};
-/**
- * Returns a QueryPlan for the query.
- */
-DBQuery.prototype.getQueryPlan = function() {
- return new QueryPlan(this);
-};
-
DBQuery.prototype.toString = function() {
return "DBQuery: " + this._ns + " -> " + tojson(this._query);
};
@@ -895,60 +885,6 @@ DBCommandCursor.prototype.itcount = DBQuery.prototype.itcount;
DBCommandCursor.prototype.shellPrint = DBQuery.prototype.shellPrint;
DBCommandCursor.prototype.pretty = DBQuery.prototype.pretty;
-/**
- * QueryCache
- * Holds a reference to the cursor.
- * Proxy for planCache* query shape-specific commands.
- */
-if ((typeof QueryPlan) == "undefined") {
- QueryPlan = function(cursor) {
- this._cursor = cursor;
- };
-}
-
-/**
- * Name of QueryPlan.
- * Same as collection.
- */
-QueryPlan.prototype.getName = function() {
- return this._cursor._collection.getName();
-};
-
-/**
- * tojson prints the name of the collection
- */
-
-QueryPlan.prototype.tojson = function(indent, nolint) {
- return tojson(this.getPlans());
-};
-
-/**
- * Displays help for a PlanCache object.
- */
-QueryPlan.prototype.help = function() {
- var shortName = this.getName();
- print("QueryPlan help");
- print("\t.help() - show QueryPlan help");
- print("\t.clearPlans() - drops query shape from plan cache");
- print("\t.getPlans() - displays the cached plans for a query shape");
- return __magicNoPrint;
-};
-
-/**
- * List plans for a query shape.
- */
-QueryPlan.prototype.getPlans = function() {
- return this._cursor._collection.getPlanCache().getPlansByQuery(this._cursor).plans;
-};
-
-/**
- * Drop query shape from the plan cache.
- */
-QueryPlan.prototype.clearPlans = function() {
- this._cursor._collection.getPlanCache().clearPlansByQuery(this._cursor);
- return;
-};
-
const QueryHelpers = {
_applyCountOptions: function _applyCountOptions(query, options) {
const opts = Object.extend({}, options || {});