* Drops all indexes from this collection. * * @param options - Optional settings for the command
(options?: DropIndexesOptions)
| 718 | * @param options - Optional settings for the command |
| 719 | */ |
| 720 | async dropIndexes(options?: DropIndexesOptions): Promise<boolean> { |
| 721 | try { |
| 722 | await executeOperation( |
| 723 | this.client, |
| 724 | new DropIndexOperation(this as TODO_NODE_3286, '*', resolveOptions(this, options)) |
| 725 | ); |
| 726 | return true; |
| 727 | } catch (error) { |
| 728 | // TODO(NODE-6517): Driver should only filter for namespace not found error. Other errors should be thrown. |
| 729 | if (error instanceof MongoOperationTimeoutError) throw error; |
| 730 | return false; |
| 731 | } |
| 732 | } |
| 733 | |
| 734 | /** |
| 735 | * Get the list of all indexes information for the collection. |
no test coverage detected