Articles
MongoDB K8s manifest
Here's a simple manifest to deploy MongoDB with data persistence in microk8s:
Mongoose bulkWrite upsert
Here is a code snippet for a bulk update with upsert using Mongoose:
Mongoose bulk update upsert
MongoDB's upsert option enables the creation of a new document if the query of an update operationdoesn't match any existing document. Basically, an update command with upsert creates a document if it does notexist already, and update it otherwise.
Mongoose query documents with matching array element
As a NoSQL database, MongoDB can store arrays as fields of a document. This article presents how to query such documents by filtering those with arrays that contain a specific value.