📜  猫鼬中的更新查询 - Javascript 代码示例

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

代码示例3
const res = await Person.updateOne({ name: 'Jean-Luc Picard' }, { ship: 'USS Enterprise' });
res.n; // Number of documents matched
res.nModified; // Number of documents modified