javascript - Mongo collection.find().then() 不是函数
问题描述
这个我可以,没问题
myCollection.findOne({_id:"1234"})
.then(function(element){
});
但我不能这样做
myCollection.find()
.then(function(element){
});
因为显然
TypeError: myCollection.find(...).then 不是函数
解决方案
推荐阅读
- r - 在 Shiny 中不同的导入 xlsx-Sheets 上运行 R-Code
- delphi - Delphi C++ Indy UDP Server BytesToString 没有收到正确的字符串?
- git - GIT:无法暂存更改以提交,在我提交更改之前无法拉取
- ncurses - 屏幕真彩 Ubuntu 18.04 坏了
- java - 如何维护 2 个不同的 Web 应用程序之间的用户会话?
- google-chrome - Chrome 扩展原生消息在 MacOS 上不起作用
- c# - 需要一种策略来缓存有关对象的信息而不使其保持活动状态
- android - Android:layout_weight 不适用于 Button 和 LinearLayout
- jenkins - 詹金斯构建触发器不等待孩子的孩子完成
- node.js - 在 Restify API 中实现的 Socket.io 的蝗虫负载测试导致显着减速