Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MongoDB.BulkOperation.UpdateOne

Queues an update as part of a bulk operation.

Component Version macOS Windows Linux Server iOS SDK
MongoDB 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "MongoDB.BulkOperation.UpdateOne"; MongoDBRef; selectorJSON; updateJSON { ; OptionsJSON } )   More

Parameters

Parameter Description Example Flags
MongoDBRef The reference number for the mongo connection. $MongoDB
selectorJSON A JSON containing the query to match the document for updating.
updateJSON A JSON containing the update to perform. If updating with a pipeline, a JSON array.
OptionsJSON Options to use. "{\"upsert\": true}" Optional

Result

Returns OK or error.

Description

Queues an update as part of a bulk operation.
It will only modify a single document on the MongoDB server. This function does not execute the operation. To execute the entirety of the bulk operation call MongoDB.BulkOperation.Execute.

See also

This function checks for a license.

Created 9th August 2026, last changed 9th August 2026


MongoDB.BulkOperation.UpdateMany - MongoDB.ChangeStreamErrorDocument


MarkDown version: MongoDBBulkOperationUpdateOne.md