这里没什么好说的,直接贴文了

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 db.collection.update() method updates a singledocument. To update multiple documents, use the multi option.

Additional Methods

The following methods can also update documents from a collection:

See the individual reference pages for the methods for more information and examples.

最新文章

  1. ASP.NET MVC企业级实战目录
  2. xcode8集成百度地图(framwork包) archive是bitcode问题
  3. Windows无法安装到GPT分区形式磁盘的解决办法
  4. SQL数据库基础(七)
  5. crontab 日志备份定时任务
  6. dbutils 执行sql返回的数据类型
  7. 图论(2-sat):Priest John's Busiest Day
  8. HTML标准事件(包含HTML5)
  9. iOS深入学习 (Block全面分析)
  10. C/C++中慎用宏(#define)
  11. mybatisPeizhixml文件的层次结构
  12. Eclipse Ctrl+Space 无法工作的问题
  13. 机器学习算法总结(五)——聚类算法(K-means,密度聚类,层次聚类)
  14. Why does the C# compiler translate this != comparison as if it were a > comparison?
  15. Got fatal error 1236原因和解决方法
  16. Android直播实现srs流媒体服务器部署
  17. 后台返回json字符串 页面js报错 Uncaught SyntaxError: Unexpected identifier
  18. asp 月末 月初
  19. maven一模块字段调用另一个模块数据生成下拉框
  20. Unity读取配置文件

热门文章

  1. 基于html5和css3响应式全屏滚动页面切换效果
  2. phoenix 入门
  3. Odoo 8.0 new API 之one装饰
  4. Unix系统编程()malloc和free的实现
  5. Linux 高频工具快速教程
  6. Servlet开发-----基础及MVC设计模式
  7. java----监听器的作用
  8. CSS3文字立体效果
  9. Linxu内核参数详解
  10. Ubuntu Mysql 安装