FAFaruk Abdulla Munshiinmunshi.dev路Feb 1, 2021 路 5 min readMongoDB Basic Shell Commands (part-7)MongoDB Basic Shell Commands (part-6) Aggregation Framework Aggregation framework in its simple form is just another way to query data in MongoDB. It can do whatever the MongoDB Query Language (MQL) can do and more. Let us switch to the sample_airb...00
FAFaruk Abdulla Munshiinmunshi.dev路Jan 31, 2021 路 3 min readMongoDB Basic Shell Commands (part-6)MongoDB Basic Shell Commands (part-5) Array Operators $elemMatch $elemMatch allows us to have access to the sub-document of an array field. We have a database sample_training, where one of the documents of the grades collection looks like this: { ...00
FAFaruk Abdulla Munshiinmunshi.dev路Jan 30, 2021 路 7 min readMongoDB Basic Shell Commands (part-5)MongoDB Basic Shell Commands (part-4) Array Operators $push Allows us to add an element to an array. Turns a field into an array field if it was previously a different type. The following command updates one document in the grades collection where ...00
FAFaruk Abdulla Munshiinmunshi.dev路Jan 29, 2021 路 4 min readMongoDB Basic Shell Commands (part-4)MongoDB Basic Shell Commands (part-3) Expressive Query Operator : $expr $expr => Expressive $expr allows the use of aggregation expressions within the query language. Syntax: { $expr: { <expression> } } $expr allows us to use variables and conditi...00
FAFaruk Abdulla Munshiinmunshi.dev路Jan 28, 2021 路 4 min readMongoDB Basic Shell Commands (part-3)MongoDB Basic Shell Commands (part-2) Deleting Documents and Collections deleteOne() and deleteMany() Syntax : db.collection.deleteOne(<query>) and db.collection.deleteMany(<query>). The following command deletes all the documents that have test fiel...00