MongoCollectionReplaceOne[MongoCollection[…],filter,replacement]
replaces one document that matches the filter filter with the new document defined by replacement.
MongoCollectionReplaceOne
MongoCollectionReplaceOne[MongoCollection[…],filter,replacement]
replaces one document that matches the filter filter with the new document defined by replacement.
更多信息和选项
- 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.
技术笔记
相关指南
文本
Wolfram Research (2018),MongoCollectionReplaceOne,Wolfram 语言函数,https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionReplaceOne.html.
CMS
Wolfram 语言. 2018. "MongoCollectionReplaceOne." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionReplaceOne.html.
APA
Wolfram 语言. (2018). MongoCollectionReplaceOne. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionReplaceOne.html 年
BibTeX
@misc{reference.wolfram_2025_mongocollectionreplaceone, author="Wolfram Research", title="{MongoCollectionReplaceOne}", year="2018", howpublished="\url{https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionReplaceOne.html}", note=[Accessed: 18-April-2026]}
BibLaTeX
@online{reference.wolfram_2025_mongocollectionreplaceone, organization={Wolfram Research}, title={MongoCollectionReplaceOne}, year={2018}, url={https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionReplaceOne.html}, note=[Accessed: 18-April-2026]}