MCPcopy
hub / github.com/mongodb/node-mongodb-native / explain

Method explain

src/cursor/aggregation_cursor.ts:105–121  ·  view source on GitHub ↗
(
    verbosity?: ExplainVerbosityLike | ExplainCommandOptions | { timeoutMS?: number },
    options?: { timeoutMS?: number }
  )

Source from the content-addressed store, hash-verified

103 options: { timeoutMS?: number }
104 ): Promise<Document>;
105 async explain(
106 verbosity?: ExplainVerbosityLike | ExplainCommandOptions | { timeoutMS?: number },
107 options?: { timeoutMS?: number }
108 ): Promise<Document> {
109 const { explain, timeout } = this.resolveExplainTimeoutOptions(verbosity, options);
110 return (
111 await executeOperation(
112 this.client,
113 new AggregateOperation(this.namespace, this.pipeline, {
114 ...this.aggregateOptions, // NOTE: order matters here, we may need to refine this
115 ...this.cursorOptions,
116 ...timeout,
117 explain: explain ?? true
118 })
119 )
120 ).shift(this.deserializationOptions);
121 }
122
123 /** Add a stage to the aggregation pipeline
124 * @example

Callers

nothing calls this directly

Calls 2

executeOperationFunction · 0.90
shiftMethod · 0.45

Tested by

no test coverage detected