Inserts a single document into a collection.
|
|
db.collection.insertMany() inserts multiple documents into a collection.
|
|
db.collection.insert() inserts a single document or multiple documents into a collection.
|
- db.collection.update() when used with the upsert: true option.
- db.collection.updateOne() when used with the upsert: true option.
- db.collection.updateMany() when used with the upsert: true option.
- db.collection.findAndModify() when used with the upsert: true option.
- db.collection.findOneAndUpdate() when used with the upsert: true option.
- db.collection.findOneAndReplace() when used with the upsert: true option.
- db.collection.save().
- db.collection.bulkWrite().