Skip to content

MongoDB Go Driver Beta 1

Pre-release
Pre-release
Compare
Choose a tag to compare
@skriptble skriptble released this 06 Dec 19:56
· 1447 commits to master since this release

The MongoDB Go driver team is pleased to release the first beta release of the official Go driver.

This release updates the BSON codec system, changes the location of various types in the BSON library, and contains a restructure of the repository. This release contains a stability guarantee for the packages not under the x directory.

Documentation can be found on GoDoc and the MongoDB documentation site. Questions and inquiries can be asked on the mongo-go-driver Google Group. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Repository Structure & Stability

This release comes with the first set of stabilizing APIs. Unless significant issues are found with stabilizing APIs, they will not be changed between this beta and the first major release of this driver. The packages have been restructured to better indicate which packages are stabilizing and which are not. Libraries under the x directory do not follow a stability guarantee and may change significantly in the future.

BSON Codec System

The BSON codec system has been improved to be more flexible and extensible. The primitive package has gained the D, M, and A types, which are used by default when decoding into an interface{}.

Release Notes

Bug

  • [GODRIVER-409] - bson decoder should not zero entire struct before beginning unmarshalling
  • [GODRIVER-464] - nil check of cursor missing in changeStream Close function
  • [GODRIVER-588] - Cannot decode pointers to nil / cannot decode *ObjectID
  • [GODRIVER-591] - ChangeStream option BatchSize is passed to the pipeline stage instead to the cursor
  • [GODRIVER-598] - Cannot decode when any ObjectId field is null in database
  • [GODRIVER-603] - ChangeStream should not panic when a user changes ResumeToken
  • [GODRIVER-611] - UnmarshalExtJSON array fail
  • [GODRIVER-630] - EXT JSON Parser Empty Object Handling
  • [GODRIVER-644] - SetResumeAfter should take a interface{}
  • [GODRIVER-645] - lookupInterfaceDecoder does not ensure type is a pointer
  • [GODRIVER-646] - Decoding javascript into bson.D fails
  • [GODRIVER-649] - Unmarshaling arrays and objects into bson.D yields bsonx types
  • [GODRIVER-650] - MarshalBSON not called for non-primitive types within bson.D
  • [GODRIVER-651] - InsertedID from InsertResult is a bsonx
  • [GODRIVER-654] - GridFS bindings give int64 but package trys to receive them as int32 from bson
  • [GODRIVER-666] - Write concern should not be encoded in aggregate unless $out is specified

New Feature

  • [GODRIVER-437] - Add helpers for database and client level change streams

Improvement

  • [GODRIVER-211] - Revise connection pooling options on Client/connstring
  • [GODRIVER-348] - Refactor Client Creation
  • [GODRIVER-469] - Update ChangeStream spec to detail usage of startAtOperationTime
  • [GODRIVER-535] - Add support for pointers to reflect.Kind types
  • [GODRIVER-542] - Enable dep support
  • [GODRIVER-555] - Database.RunCommand should return *DocumentResult
  • [GODRIVER-570] - InsertMany docs still claim batching is not supported
  • [GODRIVER-571] - CountDocuments documentation references private function countDocumentsAggregatePipeline
  • [GODRIVER-595] - Better BSON Transition Errors
  • [GODRIVER-614] - Restructure Go Driver Repository
  • [GODRIVER-647] - bson.NewDocument should be removed from documentation
  • [GODRIVER-653] - Docstring on Raw.Lookup is incorrect for return type
  • [GODRIVER-657] - EmptyInterfaceEncoder should handle nil properly
  • [GODRIVER-661] - Consolidate objectid and decimal packages into primitive
  • [GODRIVER-662] - Change ValueEncoder and ValueDecoder to use reflect.Value instead of interface{}
  • [GODRIVER-670] - Move D family of types from bson package to primitive package
  • [GODRIVER-673] - ValueReader should support reading the bytes of a top level document