16.Update Methods-官方文档摘录
这里没什么好说的,直接贴文了
MongoDB provides the following methods for updating documents in a collection:
db.collection.updateOne() |
Updates at most a single document that match a specified filter even though multiple documents may match the specified filter. New in version 3.2. |
db.collection.updateMany() |
Update all documents that match a specified filter. New in version 3.2. |
db.collection.replaceOne() |
Replaces at most a single document that match a specified filter even though multiple documents may match the specified filter. New in version 3.2. |
db.collection.update() |
Either updates or replaces a single document that match a specified filter or updates all documents that match a specified filter. By default, the |
Additional Methods
The following methods can also update documents from a collection:
db.collection.findOneAndReplace()
.db.collection.findOneAndUpdate()
.db.collection.findAndModify()
.db.collection.save()
.db.collection.bulkWrite()
.
See the individual reference pages for the methods for more information and examples.
最新文章
- ASP.NET MVC企业级实战目录
- xcode8集成百度地图(framwork包) archive是bitcode问题
- Windows无法安装到GPT分区形式磁盘的解决办法
- SQL数据库基础(七)
- crontab 日志备份定时任务
- dbutils 执行sql返回的数据类型
- 图论(2-sat):Priest John's Busiest Day
- HTML标准事件(包含HTML5)
- iOS深入学习 (Block全面分析)
- C/C++中慎用宏(#define)
- mybatisPeizhixml文件的层次结构
- Eclipse Ctrl+Space 无法工作的问题
- 机器学习算法总结(五)——聚类算法(K-means,密度聚类,层次聚类)
- Why does the C# compiler translate this != comparison as if it were a > comparison?
- Got fatal error 1236原因和解决方法
- Android直播实现srs流媒体服务器部署
- 后台返回json字符串 页面js报错 Uncaught SyntaxError: Unexpected identifier
- asp 月末 月初
- maven一模块字段调用另一个模块数据生成下拉框
- Unity读取配置文件