SMC Mongoose Query Builder Helper
SMC Mongoose Query Builder Helper is a simple wrapper for create mongoose queries for retrieve data from your mongoose collection(s) as you wish.
You can query your collections by following few small steps.
- Create an empty query first
- Append your initial query by adding conditions one by one
- Pass query into
mongoose.model.find()
/mongoose.model.findOne()
Installation
Install the smc-mongoose-query-builder-helper
as follows
$ npm install smc-mongoose-query-builder-helper --save
Usage
import queryBuilder from 'smc-mongoose-query-builder-helper'; let query = {}; // If you want to find
Dependencies
Dillinger is currently extended with the following plugins. Instructions on how to use them in your own application are linked below.
package | README |
---|---|
mongoose | https://github.com/Automattic/mongoose/blob/master/README.md |
License
ISC
A Free Software, Enjoy it!