You should be able to find it if you check the documentation carefully. I don't use the mongoose driver so I'm not very familiar with it. The following information is for reference only: http://mongoosejs.com/docs/qu...
Anywhere a callback is passed to a query in Mongoose, the callback follows the pattern callback(error, results). What results is depends on the operation: For findOne() it is a potentially-null single document, find() a list of documents, count() the number of documents, update() the number of documents affected, etc. The API docs for Models provide more detail on what is passed to the callbacks.
mongsoose’s official documentation is quite clear. You can refer to the official documentation. For general query statements, the callback function has two attributes: error and document. The internal implementation of each module can be seen in the official documentation, so if you want to know how many parameters are passed in and how different parameters are processed, it is easy to check.
You should be able to find it if you check the documentation carefully. I don't use the mongoose driver so I'm not very familiar with it. The following information is for reference only:
http://mongoosejs.com/docs/qu...
See the documentation
Using TypeScript:
mongsoose’s official documentation is quite clear. You can refer to the official documentation. For general query statements, the callback function has two attributes: error and document. The internal implementation of each module can be seen in the official documentation, so if you want to know how many parameters are passed in and how different parameters are processed, it is easy to check.