17.Delete Methods-官方文档摘录
介绍delete的方法
MongoDB provides the following methods to delete documents of a collection:
db.collection.deleteOne() |
Delete 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.deleteMany() |
Delete all documents that match a specified filter. New in version 3.2. |
db.collection.remove() |
Delete a single document or all documents that match a specified filter. |
Additional Methods
The following methods can also delete documents from a collection:
db.collection.findOneAndDelete()
.findOneAndDelete() provides a sort option. The option allows for the deletion of the first document sorted by the specified order.
db.collection.findAndModify()
.db.collection.findAndModify()
provides a sort option. The option allows for the deletion of the first document sorted by the specified order.
See the individual reference pages for the methods for more information and examples.
17.Delete Methods-官方文档摘录的更多相关文章
- Cocos Creator 加载和切换场景(官方文档摘录)
Cocos Creator 加载和切换场景(官方文档摘录) 在 Cocos Creator 中,我们使用场景文件名( 可以不包含扩展名)来索引指代场景.并通过以下接口进行加载和切换操作: cc.dir ...
- ng的概念层次(官方文档摘录)
官方文档是这么说的: You write Angular applications by: composing HTML templates with Angularized markup, writ ...
- Cocos Creator 使用计时器(官方文档摘录)
在 Cocos Creator 中,我们为组件提供了方便的计时器,这个计时器源自于 Cocos2d-x 中的 cc.Scheduler,我们将它保留在了 Cocos Creator 中并适配了基于组件 ...
- angular 模板语法(官方文档摘录)
https://angular.cn/guide/template-syntax {{}} 和"" 如果嵌套,{{}}里面求完值,""就是原意 <h3&g ...
- Cocos Creator 生命周期回调(官方文档摘录)
Cocos Creator 为组件脚本提供了生命周期的回调函数.用户通过定义特定的函数回调在特定的时期编写相关 脚本.目前提供给用户的声明周期回调函数有: onLoad start update la ...
- Qt元类型(MetaType)注册入门(附一些官方文档的关键摘录)
昨天调试项目时,突然发现如下消息: QObject::connect: Cannot queue arguments of type 'ERROR_LEVEL' (Make sure 'ERROR_L ...
- Spring Data Commons 官方文档学习
Spring Data Commons 官方文档学习 -by LarryZeal Version 1.12.6.Release, 2017-07-27 为知笔记版本在这里,带格式. Table o ...
- hbase官方文档(转)
FROM:http://www.just4e.com/hbase.html Apache HBase™ 参考指南 HBase 官方文档中文版 Copyright © 2012 Apache Soft ...
- HBase官方文档
HBase官方文档 目录 序 1. 入门 1.1. 介绍 1.2. 快速开始 2. Apache HBase (TM)配置 2.1. 基础条件 2.2. HBase 运行模式: 独立和分布式 2.3. ...
- Spring 4 官方文档学习(十二)View技术
关键词:view technology.template.template engine.markup.内容较多,按需查用即可. 介绍 Thymeleaf Groovy Markup Template ...
随机推荐
- Windows Phone 修改系统定义的资源颜色
[问题的背景] 相信有些经验的WP研发同学都会遇到下面的问题: 系统控件以及WPToolkit中大量使用了PhoneAccentBrush这个画刷(这个画刷定义的是系统的强调色,即用户选择的主题颜色) ...
- [ucos]了解ucos
1. uCosIII移植到STM32F10x http://www.cnblogs.com/hiker-blogs/archive/2012/06/13/2547176.html 2. uCosIII ...
- jquery checkbox选中
楼主写的在1.6之前是没有问题的,jquery 1.6后就要这样写了,<input type='checkbox' id='cb'/> <script> //获取是否选中 va ...
- 第二百五十七节,Tornado框架-路由映射,逻辑处理,文件归类配置
Tornado框架-路由映射,逻辑处理,文件归类配置 Tornado框架 Tornado 是 FriendFeed 使用的可扩展的非阻塞式 web 服务器及其相关工具的开源版本.这个 Web 框架看起 ...
- Linux心得记录
2014.4.8 linux环境下如何删除一个目录? rm -r linux本身提供删除目录命令——rmdir,但是如果你要删除的目录中含有子目录或者子文件,那么该命令会提示“删除失败:目录非空“也就 ...
- hdu 1257 最少拦截系统(动态规划 / 贪心)
最少拦截系统 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Subm ...
- Hadoop1.2.1 出现Warning: $HADOOP_HOME is deprecated.的解决方案
通过启动或停止hadoop我们会发现会出现 “Warning: $HADOOP_HOME is deprecated” 这样一个警告,下面给出解决方案: 不过我们一般推荐第二种,因为我们还是需要$HA ...
- 使用 awk 过滤文本或文件中的字符串
当我们在 Unix/Linux 下使用特定的命令从字符串或文件中读取或编辑文本时,我们经常需要过滤输出以得到感兴趣的部分.这时正则表达式就派上用场了. 什么是正则表达式? 正则表达式可以定义为代表若干 ...
- 【BZOJ4551】[Tjoi2016&Heoi2016]树 并查集
[BZOJ4551][Tjoi2016&Heoi2016]树 Description 在2016年,佳媛姐姐刚刚学习了树,非常开心.现在他想解决这样一个问题:给定一颗有根树(根为1),有以下两 ...
- NIO概览
NIO专题:http://developer.51cto.com/art/201112/307172.htm 一.新IO概述: 新IO和传统IO都是用于进行输入/输出,相比于传统IO面向流的处理方式, ...