MongoClient.connect(url, function(err, db) {
if (err) throw err;
var dbPartialBoards = db.db("partialsBoards");
dbPartialBoards.collection.find().forEach(function(collName) {
var doc = dbPartialBoards.collection(collName).findOne({"id" : data[1]});
if(doc != null) console.log(doc.id + " was found in " + collName);
});
})
但是它告诉我dbPartialBoards.collection.find不是一个函数。 请帮忙!