MongoDB

Frends.MongoDB.Delete / 1.0.1

Summary

Deletes the documents matching a filter, either the first match or all of them.

Typical use — housekeeping and removals driven by another system, where the single-or-many choice guards against a filter that is too broad

Details

Frends version
5.5 and newer
Agent
Crossplatform
Target framework
net6.0

InputType options.

Name Type Default Example Description
DeleteOptions DeleteOptions DeleteOne DeleteOptions.DeleteOne

Delete single or multiple documents.

Possible values:

  • DeleteOne: Delete at most a single document that match a specified filter even though multiple documents may match the specified filter.

  • DeleteMany: Delete all documents that match a specified filter.

InputType InputType Filter InputType.Filter

Input type.

Possible values:

  • Filter: A single filter to be processed.

  • Filters: An array of filter(s) to be processed one by one.

  • File: The file containing filter.

Filter String {'foo':'bar'}

A single filter to be processed.

Filters DocumentValues[] {{'foo':'bar'}, {'bar':'foo'}}

An array of filter(s) to be processed one by one.

File String c:\temp\file.json

The file containing filter.

An unhandled error has occurred. Reload 🗙