In the mongoose documentation it frequently lists an optional callback for certain query operators (like findOneAndUpdate
), however, it does not mention what parameters (arguments) the callback takes. What are they, and how would I find out?
Also, if conditions
, update
etc. are optional, and I want to specify a callback at the end, do I have to pass in the null
value, or empty objects or can I just specify the callback -- and hose does Mongoose know?
Model.findOneAndUpdate([conditions], [update], [options], [callback])
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…