You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* ignores the verbosity parameter and executes in "queryPlanner".
329
329
*
330
330
* @method AggregationCursor.prototype.explain
331
-
* @param {string|boolean=true} verbosity - An optional mode in which to run the explain.
331
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} verbosity - An optional mode in which to run the explain.
332
332
* @param {AggregationCursor~resultCallback} [callback] The result callback.
333
333
* @return {Promise} returns Promise if no callback passed
* @param {boolean} [options.noCursorTimeout] The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use. Set this option to prevent that.
310
310
* @param {object} [options.collation] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
311
311
* @param {boolean} [options.allowDiskUse] Enables writing to temporary files on the server.
312
-
* @param {string|boolean} [options.explain] The verbosity mode for the explain output.
312
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [options.explain] The verbosity mode for the explain output.
313
313
* @param {ClientSession} [options.session] optional session to use for this operation
* @param {boolean} [options.checkKeys=false] If true, will throw if bson documents start with `$` or include a `.` in any key value
740
740
* @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
741
741
* @param {boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
742
-
* @param {string|boolean} [options.explain] The verbosity mode for the explain output.
742
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [options.explain] The verbosity mode for the explain output.
743
743
* @param {ClientSession} [options.session] optional session to use for this operation
744
744
* @param {Collection~updateWriteOpCallback} [callback] The command result callback
745
745
* @return {Promise} returns Promise if no callback passed
* @param {boolean} [options.checkKeys=false] If true, will throw if bson documents start with `$` or include a `.` in any key value
816
816
* @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
817
817
* @param {boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
818
-
* @param {string|boolean} [options.explain] The verbosity mode for the explain output.
818
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [options.explain] The verbosity mode for the explain output.
819
819
* @param {ClientSession} [options.session] optional session to use for this operation
820
820
* @param {Collection~updateWriteOpCallback} [callback] The command result callback
821
821
* @return {Promise<Collection~updateWriteOpResult>} returns Promise if no callback passed
* @param {boolean} [options.checkKeys=false] If true, will throw if bson documents start with `$` or include a `.` in any key value
906
906
* @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
907
907
* @param {boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
908
-
* @param {string|boolean} [options.explain] The verbosity mode for the explain output.
908
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [options.explain] The verbosity mode for the explain output.
909
909
* @param {ClientSession} [options.session] optional session to use for this operation
910
910
* @param {string|object} [options.hint] optional index hint for optimizing the filter query
911
911
* @param {Collection~deleteWriteOpCallback} [callback] The command result callback
* @param {boolean} [options.checkKeys=false] If true, will throw if bson documents start with `$` or include a `.` in any key value
941
941
* @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
942
942
* @param {boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
943
-
* @param {string|boolean} [options.explain] The verbosity mode for the explain output.
943
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [options.explain] The verbosity mode for the explain output.
944
944
* @param {ClientSession} [options.session] optional session to use for this operation
945
945
* @param {string|object} [options.hint] optional index hint for optimizing the filter query
946
946
* @param {Collection~deleteWriteOpCallback} [callback] The command result callback
* @param {boolean} [options.partial=false] Specify if the cursor should return partial results when querying against a sharded system
1067
1067
* @param {number} [options.maxTimeMS] Number of milliseconds to wait before aborting the query.
1068
1068
* @param {object} [options.collation] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
1069
-
* @param {string|boolean} [options.explain] The verbosity mode for the explain output.
1069
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [options.explain] The verbosity mode for the explain output.
1070
1070
* @param {ClientSession} [options.session] optional session to use for this operation
1071
1071
* @param {Collection~resultCallback} [callback] The command result callback
1072
1072
* @return {Promise} returns Promise if no callback passed
* @param {number} [options.maxTimeMS] Number of milliseconds to wait before aborting the query.
1586
1586
* @param {object} [options.collation] Specify collation settings for operation. See {@link https://docs.mongodb.com/manual/reference/command/aggregate|aggregation documentation}.
1587
-
* @param {string|boolean} [options.explain] The verbosity mode for the explain output.
1587
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [options.explain] The verbosity mode for the explain output.
1588
1588
* @param {ClientSession} [options.session] optional session to use for this operation
1589
1589
* @param {Collection~resultCallback} [callback] The command result callback
1590
1590
* @return {Promise} returns Promise if no callback passed
* @param {boolean} [options.checkKeys=false] If true, will throw if bson documents start with `$` or include a `.` in any key value
1665
1665
* @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
1666
1666
* @param {boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
1667
-
* @param {string|boolean} [options.explain] The verbosity mode for the explain output.
1667
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [options.explain] The verbosity mode for the explain output.
1668
1668
* @param {ClientSession} [options.session] optional session to use for this operation
1669
1669
* @param {Collection~findAndModifyCallback} [callback] The collection result callback
1670
1670
* @return {Promise<Collection~findAndModifyWriteOpResultObject>} returns Promise if no callback passed
* @param {boolean} [options.checkKeys=false] If true, will throw if bson documents start with `$` or include a `.` in any key value
1699
1699
* @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
1700
1700
* @param {boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
1701
-
* @param {string|boolean} [options.explain] The verbosity mode for the explain output.
1701
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [options.explain] The verbosity mode for the explain output.
1702
1702
* @param {ClientSession} [options.session] optional session to use for this operation
1703
1703
* @param {Collection~findAndModifyCallback} [callback] The collection result callback
1704
1704
* @return {Promise<Collection~findAndModifyWriteOpResultObject>} returns Promise if no callback passed
* @param {boolean} [options.checkKeys=false] If true, will throw if bson documents start with `$` or include a `.` in any key value
1734
1734
* @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
1735
1735
* @param {boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
1736
-
* @param {string|boolean} [options.explain] The verbosity mode for the explain output.
1736
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [options.explain] The verbosity mode for the explain output.
1737
1737
* @param {ClientSession} [options.session] An ptional session to use for this operation
1738
1738
* @param {Collection~findAndModifyCallback} [callback] The collection result callback
1739
1739
* @return {Promise<Collection~findAndModifyWriteOpResultObject>} returns Promise if no callback passed
@@ -1850,7 +1850,7 @@ Collection.prototype.findAndRemove = deprecate(function(query, sort, options, ca
1850
1850
* @param {object} [options.collation] Specify collation settings for operation. See {@link https://docs.mongodb.com/manual/reference/command/aggregate|aggregation documentation}.
1851
1851
* @param {string} [options.comment] Add a comment to an aggregation command
1852
1852
* @param {string|object} [options.hint] Add an index selection hint to an aggregation command
1853
-
* @param {string|boolean} [options.explain] The verbosity mode for the explain output.
1853
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [options.explain] The verbosity mode for the explain output.
1854
1854
* @param {ClientSession} [options.session] optional session to use for this operation
1855
1855
* @param {Collection~aggregationCallback} callback The command result callback
* @param {boolean} [options.jsMode=false] It is possible to make the execution stay in JS. Provided in MongoDB > 2.0.X.
2098
2098
* @param {boolean} [options.verbose=false] Provide statistics on job execution time.
2099
2099
* @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
2100
-
* @param {string|boolean} [options.explain] The verbosity mode for the explain output.
2100
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [options.explain] The verbosity mode for the explain output.
2101
2101
* @param {ClientSession} [options.session] optional session to use for this operation
2102
2102
* @param {Collection~resultCallback} [callback] The command result callback
Copy file name to clipboardExpand all lines: lib/cursor.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1007,7 +1007,7 @@ class Cursor extends CoreCursor {
1007
1007
* ignores the verbosity parameter and executes in "queryPlanner".
1008
1008
*
1009
1009
* @method
1010
-
* @param {string|boolean=true} verbosity - An optional mode in which to run the explain.
1010
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} verbosity - An optional mode in which to run the explain.
1011
1011
* @param {Cursor~resultCallback} [callback] The result callback.
1012
1012
* @return {Promise} returns Promise if no callback passed
* @param {number} [options.batchSize=1000] The number of documents to return per batch. See {@link https://docs.mongodb.com/manual/reference/command/aggregate|aggregation documentation}.
313
313
* @param {object} [options.cursor] Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.
314
314
* @param {number} [options.cursor.batchSize=1000] Deprecated. Use `options.batchSize`
315
-
* @param {string|boolean} [options.explain] The verbosity mode for the explain output.
315
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [options.explain] The verbosity mode for the explain output.
316
316
* @param {boolean} [options.allowDiskUse=false] allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >).
317
317
* @param {number} [options.maxTimeMS] maxTimeMS specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.
318
318
* @param {number} [options.maxAwaitTimeMS] The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query.
Copy file name to clipboardExpand all lines: lib/explain.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ const ExplainVerbosity = {
11
11
12
12
/**
13
13
* @class
14
-
* @property {string} verbosity The verbosity mode for the explain output
14
+
* @property {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'} verbosity The verbosity mode for the explain output.
15
15
*/
16
16
classExplain{
17
17
/**
@@ -21,7 +21,7 @@ class Explain {
21
21
* and false as "queryPlanner". Prior to server version 3.6, aggregate()
22
22
* ignores the verbosity parameter and executes in "queryPlanner".
23
23
*
24
-
* @param {string|boolean} [verbosity] The verbosity mode for the explain output ({'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean})
24
+
* @param {'queryPlanner'|'queryPlannerExtended'|'executionStats'|'allPlansExecution'|boolean} [verbosity] The verbosity mode for the explain output.
0 commit comments