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 ...
随机推荐
- 记录一个glibc 导致的段错误以及gdb 移植
上一篇我有相关关于一个段错误的记录,现在记录当时的段错误具体是在哪里的. // 从 GNU 的官网下载当前在使用的 glibc 的源代码以及最新的 glibc 源代码 // 地址如下: http:// ...
- 在.net4的环境下使用Microsoft.AspNet.SignalR.Client 2.4.0
我的环境是运行在.net 4 framework,并且使用了signalr 在重连的时候发现,运行的服务被关闭了.找不到合适的处理的办法.因为报错是 说明: 由于未经处理的异常,进程终止.异常信息: ...
- 修改ElasticSearch默认的from size
2016年04月07日 17:04:17 阅读数:8065 如果需要搜索分页,可以通过from size组合来进行.from表示从第几行开始,size表示查询多少条文档.from默认为0,size默认 ...
- java 基础数据结构
数据结构, 需要考虑两个方面: 1. 每个元素具体的存储方法 (java中是一个对象) 2. 元素之间的关系如何实现存储 (java中也是一个对象) 另外在java中, 已经可以把跟数据结构有关的一些 ...
- 3% of users browse with IE9 and 14% of users have a disability. Why do we only cater for the former?
我想要用一个否定声明来開始我的文章:对于怎样创造一个易于用户体验的站点,我也不是了解非常多. 让作为一个资深开发人员的我操心的是,我在并没有获得太多关于这个主题(指怎样创造一个易于用户体验的站点)的实 ...
- 哪些工具可以在word中快速绘制图形
在数学试卷.论文.电子教案等编写过程中,我们经常要作出数学图形或图像,若用Word自身携带的绘图工具绘制,多有不便.比如一些曲线的形状很难画得像,画到位,作图时修修改改,颇为费力,所以需要借助一些辅助 ...
- boost实用工具:创建一个禁止复制的类 noncopyable
boost的noncopyable允许创建一个禁止复制的类,使用很简单,但很好用! C++ Code 12345678910111213141516171819202122232425262728 ...
- 数据驱动ddt+excel数据读取
我们可以将测试数据用excel存储,再用ddt去传入,不过我们需要安装对应的库,因为python是无法操作excel的 1.安装第三方库xlrd 2.创建一个excel表格,将需要测试的数据保存 3. ...
- Maven手动添加dependency(以Oracle JDBC为例)
由于Oracle授权问题,Maven不提供Oracle JDBC driver,为了在Maven项目中应用Oracle JDBC driver,必须手动添加到本地仓库.首先需要到Oracle官网上下载 ...
- JS-实时修改在textarea里面的span(实际输入的文字)
解决办法: 在开发中,多少会遇到一些界面,输入限制字数. 例如: //页面加载完毕 $(function() { //descrip是textarea的id $("#descrip" ...