📜  MongoDb 删除 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:35.240000             🧑  作者: Mango

代码示例6
1    db.coll.remove({name: "Max"})
2    db.coll.remove({name: "Max"}, {justOne: true})
3    db.coll.remove({}) // WARNING! Deletes all the docs but not the collection itself and its index definitions
4    db.coll.remove({name: "Max"}, {"writeConcern": {"w": "majority", "wtimeout": 5000}})
5    db.coll.findOneAndDelete({"name": "Max"})