总结
列举insert插入方法
MongoDB provides the following methods for inserting into a collection:
Inserts a single document into a collection. | |
inserts multiple into a collection. | |
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:
- when used with the
upsert: true
option. - when used with the
upsert: true
option. - when used with the
upsert: true
option. - when used with the
upsert: true
option. - when used with the
upsert: true
option. - when used with the
upsert: true
option. - .
- .
See the individual reference pages for the methods for more information and examples.