7.Insert Methods-官方文档摘录
总结
列举insert插入方法
MongoDB provides the following methods for inserting documents into a collection:
db.collection.insertOne() |
Inserts a single document into a collection. |
db.collection.insertMany() |
db.collection.insertMany() inserts multiple documents into a collection. |
db.collection.insert() |
db.collection.insert() inserts a single document or multiple documents into a collection. |
Additional Methods for Inserts
The following methods can also add new documents to a collection:
db.collection.update()when used with theupsert: trueoption.db.collection.updateOne()when used with theupsert: trueoption.db.collection.updateMany()when used with theupsert: trueoption.db.collection.findAndModify()when used with theupsert: trueoption.db.collection.findOneAndUpdate()when used with theupsert: trueoption.db.collection.findOneAndReplace()when used with theupsert: trueoption.db.collection.save().db.collection.bulkWrite().
See the individual reference pages for the methods for more information and examples.
7.Insert 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 中并适配了基于组件 ...
- Cocos Creator 生命周期回调(官方文档摘录)
Cocos Creator 为组件脚本提供了生命周期的回调函数.用户通过定义特定的函数回调在特定的时期编写相关 脚本.目前提供给用户的声明周期回调函数有: onLoad start update la ...
- angular 模板语法(官方文档摘录)
https://angular.cn/guide/template-syntax {{}} 和"" 如果嵌套,{{}}里面求完值,""就是原意 <h3&g ...
- Qt元类型(MetaType)注册入门(附一些官方文档的关键摘录)
昨天调试项目时,突然发现如下消息: QObject::connect: Cannot queue arguments of type 'ERROR_LEVEL' (Make sure 'ERROR_L ...
- TestNG官方文档中文版(2)-annotation(转)
1. 介绍 TestNG是一个设计用来简化广泛的测试需求的测试框架,从单元测试(隔离测试一个类)到集成测试(测试由有多个类多个包甚至多个外部框架组成的整个系统,例如运用服务器). 编写一个测试的 ...
- Google Android官方文档进程与线程(Processes and Threads)翻译
android的多线程在开发中已经有使用过了,想再系统地学习一下,找到了android的官方文档,介绍进程与线程的介绍,试着翻译一下. 原文地址:http://developer.android.co ...
- 【翻译】Django Channels 官方文档 -- Tutorial
Django Channels 官方文档 https://channels.readthedocs.io/en/latest/index.html 前言: 最近课程设计需要用到 WebSocket,而 ...
- hbase官方文档(转)
FROM:http://www.just4e.com/hbase.html Apache HBase™ 参考指南 HBase 官方文档中文版 Copyright © 2012 Apache Soft ...
随机推荐
- eclipse调试的时候查看变量出现com.sun.jdi.InvocationException occurred invoking method.
症状:如题 分析/解决方案:你的toString抛出了异常,去查看toString的代码是不是有问题,比如说空指针什么的
- (译)Getting Started——1.2.1 Defining the Concept(确定理念)
每个出色的应用都是由理念开始的.在开发应用时,你不需要把理念完善和完成后再进行开发.但是你确实需要确定你要做什么,做完后的效果如何. 为了定义理念,问自己以下的问题: 应用的受众是哪些人?应用的内容和 ...
- AVCapture编程理解
AVCapture用于媒体采集,在媒体采集的流程中,会存在如下几个对象: AVCaptureDevice.这里代表抽象的硬件设备. AVCaptureInput.这里代表输入设备(可以是它的子类),它 ...
- hdu6069 Counting Divisors 晒区间素数
/** 题目:hdu6069 Counting Divisors 链接:http://acm.hdu.edu.cn/showproblem.php?pid=6069 题意:求[l,r]内所有数的k次方 ...
- 【转】【Mysql学习】之Mac上用终端使用mySQL
收藏了几篇文章,以供查阅: 在此感谢: m0_38017925:<Mac上用终端使用mySQL> xiamu03:<在MacOS上使用终端操作数据库>
- tomcat 内存溢出原因分析及解决
一.错误提示:java.lang.OutOfMemoryError: Java heap space [原因分析] tomcat默认可以使用内存为128MB,在较大型的应用项目中不足以满足运行要求,在 ...
- Matlab之合并音频
程序功能: 1.读入wav下的所有音频 2.每个音频截取前0.6秒 3.合并每个音频 clear all; cd = 'wav'; waveFiles = dir(fullfile(cd,'*.wav ...
- 第一百五十节,封装库--JavaScript,表单验证--密码验证
封装库--JavaScript,表单验证--密码验证 效果图 html <div id="reg"> <h2 class="tuo">& ...
- 开发人员需知的Web缓存知识(转)
什么是Web缓存,为什么要使用它? 缓存的类型: 浏览器缓存: 代理服务器缓存: 网关缓存: Web缓存无害吗?为什么要鼓励缓存? Web缓存如何工作 如何控制缓存和不缓存: HTML Meta标签 ...
- RedMine Email notifications configure for MS Exchange
Boss需要用到RedMine(project management) open source. 由于不熟悉MS的SMTP服务,BOSS说他配好了,然后配置到Email notification时候, ...