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

Method dropIndex

src/collection.ts:705–713  ·  view source on GitHub ↗

* Drops an index from this collection. * * @param indexName - Name of the index to drop. * @param options - Optional settings for the command

(indexName: string, options?: DropIndexesOptions)

Source from the content-addressed store, hash-verified

703 * @param options - Optional settings for the command
704 */
705 async dropIndex(indexName: string, options?: DropIndexesOptions): Promise<Document> {
706 return await executeOperation(
707 this.client,
708 new DropIndexOperation(this as TODO_NODE_3286, indexName, {
709 ...resolveOptions(this, options),
710 readPreference: ReadPreference.primary
711 })
712 );
713 }
714
715 /**
716 * Drops all indexes from this collection.

Callers 6

operations.tsFile · 0.80
index.jsFile · 0.80

Calls 2

executeOperationFunction · 0.90
resolveOptionsFunction · 0.90

Tested by

no test coverage detected