Skip to content

MongoDB Go Driver Beta 2

Pre-release
Pre-release
Compare
Choose a tag to compare
@skriptble skriptble released this 08 Jan 18:19
· 1559 commits to master since this release

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

This release fixes a number of API and functionality bugs within the driver and includes support for MongoDB server versions 2.6 and 3.0.

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.

Legacy Server Support

This release adds support for MongoDB server versions 2.6 and 3.0. This brings the supported range of MongoDB server versions to 2.6 to 4.0 inclusive.

Release Notes

Bug

  • [GODRIVER-641] - Connect direct to a replica set member also requires ReadPreference to be set
  • [GODRIVER-659] - Collection allows insertion of a nil value
  • [GODRIVER-660] - _id should be prepended, not appended
  • [GODRIVER-667] - Default write concern should not be appended.
  • [GODRIVER-668] - Write concern should not be encoded for certain commands based on wire version.
  • [GODRIVER-675] - Nil pointer implementing Zeroer interface should not cause panic
  • [GODRIVER-676] - Panic marshaling a nil ObjectID
  • [GODRIVER-679] - Aggregate does not accept a bson.A as the pipeline
  • [GODRIVER-681] - Cursors and SingleResult ignore client custom registry
  • [GODRIVER-688] - ClientOptions.SetSSL() records some string options as being set even if they're empty strings
  • [GODRIVER-691] - ArrayEncodeValue and SliceEncodeValue don't properly handle nil for primitive.Element
  • [GODRIVER-692] - SingleResult.Decode to struct panics with nil pointer dereference
  • [GODRIVER-693] - Opening a change stream cursor for any database gives error
  • [GODRIVER-694] - UnmarshalExtJSON panics with invalid json
  • [GODRIVER-696] - SingleResult should use bson.DefaultRegistry when Registry is nil
  • [GODRIVER-697] - nil panics being encoded via bson.Marshal
  • [GODRIVER-699] - Decoding into a bson.M embeds bson.Ds, not bson.Ms
  • [GODRIVER-700] - JSON scanner fails when underlying reader reads less than the requested bytes and also returns io.EOF
  • [GODRIVER-701] - ReadPreference on client is not respected
  • [GODRIVER-708] - bsonx package is exposed in the public API of some stable packages
  • [GODRIVER-710] - Unmarshaling to a interface{} fails
  • [GODRIVER-715] - driver.KillCursors does not close connection
  • [GODRIVER-719] - Map Decoder should support non-primitive string types
  • [GODRIVER-724] - Downloading files from gridfs does not match uploaded data
  • [GODRIVER-725] - Numbers that look like integers but are too big should be treated as doubles
  • [GODRIVER-726] - Server.heartbeat uses no timeouts
  • [GODRIVER-735] - ListCollections does not use read preference primary
  • [GODRIVER-741] - Option "serverSelectionTimeoutMS" is ignored if set in connection URI

Epic

New Feature

  • [GODRIVER-109] - Implement legacy OP_QUERY, OP_GET_MORE and OP_KILL_CURSORS
  • [GODRIVER-492] - Implement legacy collection enumeration
  • [GODRIVER-677] - Alias needed in bson package for primitive.E
  • [GODRIVER-742] - Supported parsing extended JSON containing $date without $numberLong

Improvement

  • [GODRIVER-279] - Implement legacy index enumeration
  • [GODRIVER-581] - Add documentation for new bsoncodec package
  • [GODRIVER-663] - Extend the Marshal* and Unmarshal* family functions with *WithContext functions
  • [GODRIVER-665] - Support only "automatic" and "direct" as values for "connect" URI option
  • [GODRIVER-669] - Reverse Dependencies between bson and bsonx
  • [GODRIVER-683] - Make CommandMetadata struct private inside connection.go
  • [GODRIVER-729] - Add IndexOptions struct to use as the type of IndexModel.Options