The Mongoose Query API.prototype.lean() method of the Mongoose API is used on the Query objects. It allows us to know whether the returned document is… Read More
Tag Archives: Mongoose-API
The Mongoose Query API and() method is used to add additional filters to the current mongoose query instance. Syntax: Query.prototype.and(array) Parameters: It accepts the following… Read More
The Mongoose Query API set() method is used to add a $set middleware that helps in updating one or more than one MongoDB document depending… Read More
The Mongoose Schema API pre() method is used to add a pre-hook to the mongoose Schema methods and can be used to perform pre Schema… Read More
The Mongoose Query API pre() method is used to add a pre-middleware to the mongoose query instance, which can be used in performing pre-query operations.… Read More
The Mongoose Query API clone() method is used to copy a mongoose query, and then can be executed anytime later. This method is useful if… Read More
The Mongoose Query API.prototype.$where() method of the Mongoose API is used on the Query objects. It allows us to put the where condition in the… Read More
The Mongoose Document API Model.prototype.model() method of the Mongoose API is used on the Document model. It allows to get the model instance. We can… Read More
The Mongoose Model API Model.aggregate() method of the Mongoose API is used on the Document model. It allows to perform aggregation tasks on the models… Read More
The Mongoose Document APIModel() method of the Mongoose API is used on the Document model. It allows to create a MongoDB class. Using this method… Read More
The Mongoose Document API.prototype.toString() method of the Mongoose API is used on the Document model. It allows to get the result in the form of… Read More
The Mongoose Document API.prototype.toJSON() method of the Mongoose API is used on the Document model. It allows to convert the result set into JSON object.… Read More
The Mongoose Query API gt() method is used to scan all the documents in a collection and return those whose path values are greater than… Read More
The Mongoose Query API.prototype.get() method of the Mongoose API is used on the Query objects. It allows us to get the latest value for the… Read More
The Mongoose Query API.prototype.exec() method of the Mongoose API is used on the Query objects. It allows us to execute the query operation to get… Read More