logo
  • 教程列表
  • SO官方文档
  • Node.JS 和 MongoDB
    • 连接到数据库
    • 创建新集合
    • 插入文件
    • 读
    • 更新
    • 删除
  1. StackOverflow 文档
  2. Node.js 教程
  3. Node.JS 和 MongoDB
  4. 删除

删除

Created: November-22, 2018

以 mongoose 从集合中删除文档的方式如下。

Auto.remove({_id:123}, function(err, result){
    if (err) return console.error(err);
    console.log(result); // this will specify the mongo default delete result.
});
  • 更新

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明