crud-nestjs-mongoose-helper a microservice to help nodejs/nestjs mongodb developers to speed up the creation of their crud with a minimum of code.
$ npm install
import { exist, create, createIfne, one, all, allDistinct, put, destroy } from "crud-nestjs-mongoose-helper/index"
const data = await exist(databaseTableModel, {field: value});
const data = await create(databaseTableModel, body, 'onePopulateTable', fieldsToTakeInThePopulateTable);
const data = await createIfne(databaseTableModel, body, 'onePopulateTable', fieldsToTakeInThePopulateTable);
const data = await one(databaseTableModel, filterParams, fieldsToTakeInTheTable, 'onePopulateTable', fieldsToTakeInThePopulateTable);
const data = await all(databaseTableModel, filterParams, fieldsToTakeInTheTable, sortParams, limitLength 'onePopulateTable', fieldsToTakeInThePopulateTable);
const data = await allDistinct(databaseTableModel, 'onePopulateTable', filterParams);
#update a model const data = await put(databaseTableModel, body, filterParams, 'onePopulateTable', fieldsToTakeInThePopulateTable);
const data = await destroy(databaseTableModel, filterParams);
crud-nestjs-mongoose-helper is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join me, please read more here.
- Author - Achile Aïkpé
- LinkedIn - ACHILE AIKPE
crud-nestjs-mongoose-helper is MIT licensed.