📜  猫鼬更新并返回新的 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:09.403000             🧑  作者: 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