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

Method explain

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

Source from the content-addressed store, hash-verified

174 options: { timeoutMS?: number }
175 ): Promise<Document>;
176 async explain(
177 verbosity?: ExplainVerbosityLike | ExplainCommandOptions | { timeoutMS?: number },
178 options?: { timeoutMS?: number }
179 ): Promise<Document> {
180 const { explain, timeout } = this.resolveExplainTimeoutOptions(verbosity, options);
181
182 return (
183 await executeOperation(
184 this.client,
185 new FindOperation(this.namespace, this.cursorFilter, {
186 ...this.findOptions, // NOTE: order matters here, we may need to refine this
187 ...this.cursorOptions,
188 ...timeout,
189 explain: explain ?? true
190 })
191 )
192 ).shift(this.deserializationOptions);
193 }
194
195 /** Set the cursor query */
196 filter(filter: Document): this {

Calls 2

executeOperationFunction · 0.90
shiftMethod · 0.45

Tested by

no test coverage detected