{"repo":"kingRayhan/quick-crud","free":true,"listed":false,"github":"https://github.com/kingRayhan/quick-crud","clone":"git clone https://github.com/kingRayhan/quick-crud.git","description":"An easy CRUD operation based on Factory pattern with Mongoose.","language":"TypeScript","stars":20,"topics":["orm","mongodb","mongodborm","mongodb-orm","mongoose-helper","nodejs","react","mongoose-population","mongodb-filter","mongoose-model"],"license":"MIT","category":"databases-storage","readme_excerpt":"QuickCrud.js Installation or An easy CRUD operation based on Factory pattern with Mongoose. There are four CRUD operations we can do: - index({model, where, populateOptions, paginationOptions}) : Fetch all documents with pagination. - model - Mongoose model. - where - MongoDB filter object. - populateOptions - Mongoose population object/string. - paginationOptions can get three parameters. - limit:number - Resource count to show. Default is 10 - page:number - Pagination page number. Default is 1. - sort:string - MongoDB property sort key. Default is '-createdAt' - store({model, data}) - You can create a doc and store it to MongoDB. - model - Mongoose model. - data - An object of data to store in MongoDB based on Mongoose Schema - show({model, where, populationOptions}) : Fetch a single document via filter key. - model - Mongoose model. - where - MongoDB filter object. - populateOptions - Mongoose population object/string. - update({model, where, data}) - updates the first document that matches where . data is the object where you want to update the data. - model - Mongoose model. - where - MongoDB filter object. - data - An object of data to update that matches with where filter key(s). - destroy({model, where}) - Deletes the first documents that matches where from the collection. it returns the document that has been deleted. - model - Mongoose model. - where - MongoDB filter object. - destroyAll({model: where}) - Deletes all documents that matches where from the collection.","default_branch":null,"files":null,"tree":[],"storefront":"/r/kingRayhan","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kingRayhan/quick-crud/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}