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

Method fromOptions

src/explain.ts:81–90  ·  view source on GitHub ↗
({ explain }: ExplainOptions = {})

Source from the content-addressed store, hash-verified

79 }
80
81 static fromOptions({ explain }: ExplainOptions = {}): Explain | undefined {
82 if (explain == null) return;
83
84 if (typeof explain === 'boolean' || typeof explain === 'string') {
85 return new Explain(explain);
86 }
87
88 const { verbosity, maxTimeMS } = explain;
89 return new Explain(verbosity, maxTimeMS);
90 }
91}
92
93export function validateExplainTimeoutOptions(options: Document, explain?: Explain) {

Callers 15

operations.tsFile · 0.45
createEntitiesMethod · 0.45
utils.test.tsFile · 0.45
explain.test.tsFile · 0.45
aggregate.test.tsFile · 0.45
constructorMethod · 0.45
constructorMethod · 0.45
insertManyMethod · 0.45
constructorMethod · 0.45
transformFunction · 0.45
resolveOptionsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected