* Delete a document from a collection * * @param filter - The filter used to select the document to remove * @param options - Optional settings for the command
(
filter: Filter<TSchema> = {},
options: DeleteOptions = {}
)
| 460 | * @param options - Optional settings for the command |
| 461 | */ |
| 462 | async deleteOne( |
| 463 | filter: Filter<TSchema> = {}, |
| 464 | options: DeleteOptions = {} |
| 465 | ): Promise<DeleteResult> { |
| 466 | return await executeOperation( |
| 467 | this.client, |
| 468 | new DeleteOneOperation(this.s.namespace, filter, resolveOptions(this, options)) |
| 469 | ); |
| 470 | } |
| 471 | |
| 472 | /** |
| 473 | * Delete multiple documents from a collection |