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 ...
随机推荐
- redis源码学习_整数集合
redis里面的整数集合保存的都是整数,有int_16.int_32和int_64这3种类型,和C++中的set容器差不多. 同时具备如下特点: 1.set里面的数不重复,均为唯一. 2.set里面的 ...
- 给input元素换样式
浏览器默认的<input type="file">真是巨丑无比,搜了很多之后知道原来是可以把这个设置成透明的! 不过这样比较麻烦,需要将input标签对应的区域设置成和 ...
- 关于引脚复用,不得不提的GPIO_Pin_sources 和GPIO_Pin
今天在端口复用时遇到了困惑,参考:http://www.51hei.com/bbs/dpj-40992-1.html 调整前的代码GPIO_PinAFConfig(GPIOA,GPIO_Pin_9,G ...
- linux上FTP服务器搭建
一.启动vsftpd服务 1. 启动VSFTP服务器 A. cenos下运行:yum install vsftpd B. 登录Linux主机后,运行命令:"service vsftpd st ...
- python+fastcgi+flup获取请求的数据和环境变量
关于nginx+python+fastcgi+flup搭建fastcgi环境没问题了,可是如何处理POST/GET的请求数据呢,这个问题着实纠结了没久,通过尝试和阅读flup的源代码,终于明白了.先上 ...
- Acme Corporation UVA - 11613 拆点法+最大费用最大流(费用取相反数)+费用有正负
/** 题目:Acme Corporation UVA - 11613 拆点法+最大费用最大流(费用取相反数)+费用有正负 链接:https://vjudge.net/problem/UVA-1161 ...
- 【转】MYSQL 存储过程定时操作数据库
这个涉及2个步骤,第一个就是建立存储过程: create procedure clear_table() begin drop database XXX end 第二步就是让其定时运行: 查看even ...
- 与HttpSessionListener接口有关的方法是。
与HttpSessionListener接口有关的方法是. A.sessionInitialized() B.sessionCreated() C.sessionFinialized() D.sess ...
- 《转》openstack中删除虚拟主机,状态一直deleting
一.我重新启动了该机器.之后想删除没有创建成功的虚拟机(没有打开cpu的vt).结果发现状态一直为deleting状态.在这个状态下创建虚拟机也失败. 二.分析:在/var/log/nova/nova ...
- cmake实战第二篇:让我们的代码更像个工程
为工程添加以下文件夹: bin 用来放编译好的可执行二进制文件. src 用来放源代码. lib 用来放编译好的库文件. include 用来放头文件. sudo mkdir -p /code_ ...