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 ...
随机推荐
- IBM MQ 2035 或 2013认证错误的解决方法
第一种方法: ALTER CHL(SYSTEM.BKR.CONFIG) CHLTYPE(SVRCONN) ALTER CHL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN ...
- 代码审计之Finecms任意文件下载漏洞
PS:该漏洞已被公布,只是学习.故自己跟着大佬的步伐审计. 文件地址:\controllers\ApiController.php Line 57 public function downAction ...
- 转载:vim的复制,删除,粘贴,块操作以及快速替换功能
掌握如下命令有什么好办法,我可以告诉你唯手熟尔!!多看多练对于VIM而言,复制,删除,粘贴的操作应该是非常多的.这次也做一个总结,关于处理VIM下的复制,删除,粘贴等操作.学会使用帮助文件,命令的帮助 ...
- Netty4.x中文教程系列(七)UDP协议
将近快一年时间没有更新Netty的博客.一方面原因是因为项目进度的问题.另外一方面是博主有一段时间去熟悉Unity3D引擎. 本章节主要记录博主自己Netty的UDP协议使用. 1. 构建UDP服务端 ...
- Android——UI事件的处理机制(基于监听器)
1.普通内部类(常用) xml <Button android:hint="reset" android:layout_columnWeight="1" ...
- CentOS 7 上systemctl 的用法
我们对service和chkconfig两个命令都不陌生,systemctl 是管制服务的主要工具, 它整合了chkconfig 与 service功能于一体. systemctl is-enable ...
- datagrid鼠标悬浮提示
/** * 扩展两个方法 */ $.extend($.fn.datagrid.methods, { /** * 开打提示功能 * @param {} jq * @param {} params 提示消 ...
- High-level NavMesh Building Components
Here we introduce four high level components for the navigation system: //这里我们介绍四个高水平导航系统组件: NavMesh ...
- 使用ANT编译项目报错 com.sun.image.codec.jpeg does not exist 解决方法
项目开发中在对图片进行裁切处理的时候,有时候是会使用到 com.sun 包下的类时. 假设项目使用ant编译,会出现错误 com.sun.image.codec.jpeg does not exist ...
- QQ在线聊天代码获取和使用教程
在网站上挂上悬浮QQ是一种有效的推广方式,QQ正常情况下是不被允许临时会话的,需要加为好友才可以,这样很不友好, 当今每个行业都是有很多人在做,竞争很激烈,对客户的友好是增加订单的有效途径. 地址:h ...