1 min read

The MongoDB Go driver team has announced the second alpha release of the official Go driver.

The official MongoDB Driver API for Go has certain changes as a part of the second alpha release. This release mainly contains improvements to the user experience and bug fixes. A point to be noted here is that this is an alpha software, so it is not recommended for production use. The MongoDB Go Driver team said, “following semantic versioning, the v0 version of the public API should not be considered stable and could change.”

Changes since the prior release include:

New Features:

  • Examples for sample shell commands created
  • Marshal, Unmarshal, and UnmarshalDocument functions added to BSON library
  • Stringer for objectid.ObjectID implemented

Improvements:

  • New BSON library is tested against BSON corpus
  • ReplaceOptions replaced from UpdateOptions
  • CRUD tests resynced to update insertMany test format to a map
  • Namespace type added for options in mongo package.
  • DecodeBytes method added to the Cursor
  • A method added to bson.Value to get the offset into the underlying []byte
  • mongo.Cursor is made its own interface
  • Document.ElementAt usability improved
  • bson.ArrayConstructor renamed to bson.ValueConstructor
  • FromHex function added to the objectid package

Bugs:

  • Lookup should properly traverse Arrays
  • Documentation for the bson package wrt the builder.Builder type needs to be clarified
  • Ensure methods of *Document handle the case where *Document is nil
  • Update bson.ErrTooSmall
  • bson.Reader.Lookup should return ErrElementNotFound if no element is found

The official documentation is available on GoDoc. Questions and inquiries can be asked on the mongo-go-driver Google Group.

Content Marketing Editor at Packt Hub. I blog about new and upcoming tech trends ranging from Data science, Web development, Programming, Cloud & Networking, IoT, Security and Game development.

LEAVE A REPLY

Please enter your comment!
Please enter your name here