How to Construct MongoDB Queries from a String using Golang

Introduction to Creating MongoDB queries and filters in Golang This tutorial will explain how to perform MongoDB queries with Golang. The article will cover how to create bson.M (BSON map) objects from raw JSON strings and from primitve.M BSON objects as well as how to pass those objects to the Golang driver’s method calls to … Continued

How to Create an Index Using the Golang Driver for MongoDB

Introduction This tutorial will explain how to create a MongoDB index with the Golang driver for MongoDB. Indexes are extremely helpful in speeding up access to MongoDB data by optimizing the data structure. This is accomplished by creating a list of particular fields values to render the data. This article will show how to easily … Continued

How To Insert A MongoDB Document Using The Golang Driver

Introduction This tutorial will cover how to insert a MongoDB document with Golang into a collection. The tutorial explains the InsertOne() method of the official Golang driver (mongo-go-driver) for MongoDB, how to create a MongoDB document with Golang and how to import the needed MongoDB and Golang packages. MongoDB, Golang the official Golang driver for … Continued

How To Update A MongoDB Document Using The Golang Driver

Introduction If you have data stored in MongoDB, there’s a good chance you’ll need to update certain documents from time to time. Fortunately, the Golang driver for MongoDB makes it quick and easy to accomplish this task. In this article, we’ll show you exactly how to update a MongoDB document with Golang using the mongo-go-driver. … Continued

How to Update a MongoDB Document Using the Golang Driver

Introduction The tutorial will explain the UpdateOne() API method to update a document with the Mongo-go-driver using the official Golang driver for MongoDB. It will also show how to update a MongoDB document with its BSON _id. In order to update a MongoDB document with Golang, both software packages must be installed on the same … Continued

How to Update Many MongoDB Documents Using the Golang Driver

Introduction The tutorial will explain how to use the UpdateMany() method of the official Golang driver (mongo-go-driver) for MongoDB for updating multiple MongoDB documents in a single API call. MongoDB, Golang and the official Golang driver for MongoDB must all be installed on the same machine in order to update MongoDB documents with Go and … Continued

Keep in the know!

Subscribe to our emails and we’ll let you know what’s going on at ObjectRocket. We hate spam and make it easy to unsubscribe.