MongoDB Go Driver Alpha 18
Pre-releaseThe MongoDB Go driver team is pleased to release the eighteenth alpha of the official Go driver.
This alpha release contains major updates to the mongo package and BSON library. Additionally, there are small API updates and bug fixes. This is alpha software, so it is not recommended for production use.
Following semver, the v0 version of the public API should not be considered stable and could change.
Documentation can be found on GoDoc. 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.
BSON Library Changes
The Document
, Element
, Value
, and Array
types have been redesign and rewritten. They have been moved from the bson
package to the x/bsonx
package and renamed Doc
, Elem
, Val
, and Arr
respectively. These types are still under development and are likely to change.
The BSON primitive types have been moved from the bson
package to a new package called primitive
. For example the bson.Regex
type is now the primitive.Regex
type.
Mongo API Changes
Options for the mongo
package have been redesigned. Instead of individual packages for groups of option types, there is a single options
package that contains all options. Please refer to the GoDoc page for more details.
Release Notes
Bug
- [GODRIVER-468] - adding _id to a *bson.Document mutates the document.
- [GODRIVER-505] - Client Options should be last one wins
- [GODRIVER-561] - Database.RunCommand should use the provided read preference for server selection
- [GODRIVER-563] - The writeSelector property in the mongo.Database struct should include the LatencySelector
- [GODRIVER-575] - Database.ListCollections should return mongo.Cursor, not command.Cursor
- [GODRIVER-578] - Panic in cursor Close deadlocks
- [GODRIVER-599] - ValueEncoders should check if pointer is nil
New Feature
- [GODRIVER-413] - Implement Improved BSON Design
- [GODRIVER-586] - Implement Improved Go Driver CRUD API
Improvement
- [GODRIVER-151] - Change handling of network errors or timeouts during connection handshake
- [GODRIVER-349] - Separate cursor options from other options in commands
- [GODRIVER-378] - Unconnected Client should return a mongo level error, not topology level error
- [GODRIVER-429] - Move readconcern, readpref, and writeconcern packages to mongo package
- [GODRIVER-541] - Ensure all files have proper licenses
- [GODRIVER-576] - ListCollections filter should be interface{}
- [GODRIVER-610] - Scope & Design Improved BSON Support