Insert Methods
몽고디비는 다음의 메서드를 통해서 collection에 documents를 추가합니다.
메서드 | 설명 |
---|---|
db.collections.insertOne() | 하나의 document를 collection에 추가합니다. |
db.collection.insertMany() | 다수의 document를 추가합니다. |
db.collection.insert() | 하나 또는 다수의 document를 추가합니다. |
Additional Methods for Inserts
- db.collection.update + upsert: true
- db.collection.updateOne() + upsert: true
- db.collection.updateMany() + upsert: true
- db.collection.findAndModify() + upsert: true
- db.collection.findOneAndUpdate() + upsert: true
- db.collection.findOneAndReplace() + upsert: true
- db.collection.save()
- db.collection.bulkWrite()