How to drop collections before insert data with a single method (MongoDB + Node.js)

前端 未结 0 740
时光取名叫无心
时光取名叫无心 2020-12-08 03:36

I have to drop all my collections before insert data into DB. I achieve this by doing:

mongodb.connect(
  url, function (err, client) {
    if (err) throw err         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题