Database
Introduction
Abstractions to MongoDB operations are provisioned directly on the EntityRepo object.
Overview
Basic methods for CRUD functionality and also aggregation is exposed to the EntityRepo object.
Get
This method gives ability to read data from a particular collection. Definition for the method is given as -
Example using this method in a processor -
Create
This method is used to create either a single document or an array of documents in the specified collection. Definition of the method is given as -
Example using this method in a processor -
Update
This method is used to perform updates in a particular collection. Definition of the method is given as -
Example using this method in a processor -
Delete
This method is used to delete a particular document/ entity in a collection. Definition of the method is given as -
Example using this method in a processor -
Count
This method is used to return a count of the documents returned by a particular query. Definition of the method is given as -
Example using this method in a processor is given as -
Get Collection Name
This method returns the proper mongo collection name from a mongoose schema name. Definition of this method is given as -
Example using this method in a processor is given as -
Aggregate
This is an abstraction on MongoDB's aggregation framework. Definition of this method is given as -
Example using this method in a processor is given as -