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

  • 關於本站
  • 免責聲明