Skip to content

Category Archives: Node.js

The method is used to get information about the expected and actual number of calls of the functions that have not been called the… Read More
The current date can be formatted by using the Nodejs modules like Date Object or libraries like moment.js, dayjs.  Method 1: Using Node.js Date Object… Read More
The Query.prototype.$where() specifies a JavaScript function or expression to pass to MongoDB’s query system. Using this, where the condition can be customized according to the… Read More
The Query.prototype.explain() function is used to set the explain option thereby making this query return detailed execution stats instead of the actual query result. Syntax:… Read More
The Query.prototype.limit() function is used to specify the maximum number of documents the query will return. It accepts a number type parameter. Syntax:  Query.prototype.limit() Parameters:… Read More
The Query.prototype.exec() function is used to execute the query. It can handle promises and executes the query easily. The callback can be passed as an… Read More
The process.stdin property is an inbuilt application programming interface of the process module which listens for the user input. The stdin property of the process… Read More
The Query.prototype.error() function is used to sets/gets the error flag on this query. If this flag is undefined or not null then the exec() promise… Read More
The Query.prototype.getFilter() function returns the current query filter. This function is also known as a POJO.  Syntax:   Query.prototype.getFilter() Parameters: This function has no parameter.Return Value:… Read More
The Query.prototype.elemMatch() function is used to specify the $elemMatch condition. It matches the documents that contain an array field with at least single or one… Read More
The process.stdout property is an inbuilt application programming interface of the process module which is used to send data out of our program. A Writable… Read More
The Query.prototype.get() function is used for the update operations, and it returns the value of a path in the update’s $set. Syntax:   Query.prototype.get() Parameters: This… Read More
The Query.prototype.comment() is used to specify the comment options. It makes possible to attach a comment to a query in any context that $query may… Read More
The Query.prototype.getQuery() function is used to return the current query filter. So using this function, the entire query can be printed on console. Syntax:   Query.prototype.getQuery()… Read More
The Query.prototype.cursor() function returns a wrapper around a MongoDB driver cursor. And this function triggers the pre find hooks, not the post find hooks.Syntax:   Query.prototype.cursor()… Read More

Start Your Coding Journey Now!