【发布时间】:2015-06-15 23:52:20
【问题描述】:
在mongoose documentation 中,它经常列出某些查询运算符(如findOneAndUpdate)的可选回调,但是,它没有提及回调采用哪些参数(参数)。它们是什么,我该如何发现?
另外,如果conditions、update 等是可选的,并且我想在最后指定一个回调,我必须传入null 值,还是空对象,或者我可以只指定回调——猫鼬知道吗?
Model.findOneAndUpdate([conditions], [update], [options], [callback])
【问题讨论】:
-
我不确定。但可能以下内容对您有用。 stackoverflow.com/questions/15266162/…