* Creates an index on the db and collection. * * @param name - Name of the collection to create the index on. * @param indexSpec - Specify the field to index, or an index specification * @param options - Optional settings for the command
(
name: string,
indexSpec: IndexSpecification,
options?: CreateIndexesOptions
)
| 448 | * @param options - Optional settings for the command |
| 449 | */ |
| 450 | async createIndex( |
| 451 | name: string, |
| 452 | indexSpec: IndexSpecification, |
| 453 | options?: CreateIndexesOptions |
| 454 | ): Promise<string> { |
| 455 | const indexes = await executeOperation( |
| 456 | this.client, |
| 457 | CreateIndexesOperation.fromIndexSpecification(this, name, indexSpec, options) |
| 458 | ); |
| 459 | return indexes[0]; |
| 460 | } |
| 461 | |
| 462 | /** |
| 463 | * Remove a user from a database |
no test coverage detected