(
verbosity?: ExplainVerbosityLike | ExplainCommandOptions | { timeoutMS?: number },
options?: { timeoutMS?: number }
)
| 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 |
nothing calls this directly
no test coverage detected