📜  找到一个并更新 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:01.092000             🧑  作者: Mango

代码示例1
db.collection.findOneAndUpdate(
   ,
   , // Changed in MongoDB 4.2
   {
     projection: ,
     sort: ,
     maxTimeMS: ,
     upsert: ,
     returnNewDocument: ,
     collation: ,
     arrayFilters: [ , ... ]
   }
)