📜  更新文档需要原子操作符 - Javascript 代码示例

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

代码示例3
db.c20160712.updateOne(
    { "Attribute" : "good" }, 
    { $set: {"Type" : "DVD", "Title" : "Matrix, The", "Released" : 1999, "Genre" : "Action" } },
    { upsert: true }
);