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 ...
随机推荐
- [svc]msmtp+mutt发附件,发邮件给多个人
环境:centos6.7 x86-64 内网有web服务器(curl可展示目录) #预安装软件 yum install lrzsz ntpdate sysstat dos2unix wget teln ...
- 基于flink快速开发实时TopN程序
TopN 是统计报表和大屏非常常见的功能,主要用来实时计算排行榜.流式的TopN可以使业务方在内存中按照某个统计指标(如出现次数)计算排名并快速出发出更新后的排行榜. 我们以统计词频为例展示一下如何快 ...
- PyCharm Python迁移项目
把整个项目文件迁移过去后,执行文件会报不能执行XX,系统找不到指定的文件. 此时把当前的这个文件名字改一下,再运行,修改提示的错误.等错误全部修改,可以正常运行后,再把文件名改回去
- onActivityResult 通过case对不同情况进行处理
@Overridepublic void onActivityResult(int requestCode, int resultCode, Intent data) { switch (result ...
- Android ----------------- 面试题 整理 一
1. XML的解析方式都有哪些? 每一种解析方式的运行流程? 设XML为:<a>a<b>bc<c>c1</c></b></a> ...
- [转]jna模拟指针开辟空间,数组首地址获取值
http://blog.csdn.net/zhuzhichao0201/article/details/5817819 不是很明白,先记在这里 ———————————————————————————— ...
- 要创建一个EJB,必须要至少编写哪些Java类和接口?
要创建一个EJB,必须要至少编写哪些Java类和接口? A. 定义远程(或业务)接口 B. 定义本地接口 C. 定义Bean接口 D. 编写Bean的实现 解答:ABC
- 什么是 Web?
Web这个词刚开始显得有些泛泛,似乎“冲浪”.“网上存在”以及“主页”等等都和它拉上了一些关系. 甚至还有一种“Internet 综合症”的说法,对许多人狂热的上网行为提出了质疑.我们在这里有必要作一 ...
- [Hadoop]安装
1 从官网下载hadoop稳定版 http://www.apache.org/dyn/closer.cgi/hadoop/common/ 2 安装JAVA 参考如下blog http://www.cn ...
- Android一键锁屏源码
APK下载 源程序下载 锁屏流程如下(参考于Android一键锁屏开发全过程[源码][附图]) 源码参考于一键锁屏 源码 一共有2个Java文件: package com.example.onekey ...