MongoLink`
MongoLink`
MongoCollectionReplaceOne
MongoCollectionReplaceOne[MongoCollection[…],filter,replacement]
replaces one document that matches the filter filter with the new document defined by replacement.
Details and Options
- To use MongoCollectionReplaceOne, you first need to load MongoLink using Needs["MongoLink`"].
- filter is an Association. The the same query syntax is used as in MongoCollectionFind. The list of available query selectors can be found in the MongoDB documentation.
- replacement is an Association. Update operators cannot be used.
- The following options are supported:
-
"Upsert" False If True, perform an insert if no documents match the filter. "WriteConcern" Automatic either Automatic, or a MongoWriteConcern object. - More information about the behaviour of "Upsert" can be found in the MongoDB documentation.
- MongoCollectionReplaceOne corresponds to db.collection.replaceOne() in the MongoDB documentation.
Examples
Wolfram Research (2018), MongoCollectionReplaceOne, Wolfram Language function, https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionReplaceOne.html.
Text
Wolfram Research (2018), MongoCollectionReplaceOne, Wolfram Language function, https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionReplaceOne.html.
CMS
Wolfram Language. 2018. "MongoCollectionReplaceOne." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionReplaceOne.html.
APA
Wolfram Language. (2018). MongoCollectionReplaceOne. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionReplaceOne.html