MongoDB

Frends.MongoDB.Update / 1.0.1

Summary

Applies an update to the documents matching a filter, either the first match or all of them, and reports how many changed.

Typical use — reflecting changes from a master system; the reported count is what tells you the filter matched what you expected

Details

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

InputType options.

Name Type Default Example Description
UpdateOptions UpdateOptions UpdateOne UpdateOptions.UpdateOne

Update single or multiple documents.

Possible values:

  • UpdateOne: Updates a single document that match a specified filter.

  • UpdateMany: Update all documents that match a specified filter.

UpdateString String "{ $set: { 'foo': 'updated'} }"

The value(s) to be updated to document(s).

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 🗙