Skip to content

Releases: mongodb/mongo-go-driver

MongoDB Go Driver Beta 2

08 Jan 18:19
Compare
Choose a tag to compare
Pre-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

MongoDB Go Driver Beta 1

06 Dec 19:56
Compare
Choose a tag to compare
Pre-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

MongoDB Go Driver Alpha 18

15 Nov 19:44
Compare
Choose a tag to compare
Pre-release

The 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

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

MongoDB Go Driver Alpha 17

25 Oct 21:22
Compare
Choose a tag to compare
Pre-release

The MongoDB Go driver team is pleased to release the seventeenth alpha of the official Go driver.

This alpha release reverses the dependency between the bson and bsoncodec packages, which is elaborated below. 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 Package Dependency Reversal

This release reverses the dependency between the `bson` and `bsoncodec` packages. This allows the bson package to contain the `Marshal` and `Unmarshal` family of functions and the `Encoder` and `Decoder` types. This allows future types in the bson package to handle the empty interface. Users should be able to rely on the `bson` package for most functionality.

Release Notes

Bug

  • [GODRIVER-473] - toExtJSON does not escape double quotes in strings
  • [GODRIVER-529] - Value.Interface() returns the .String() result for EmbeddedDocument and Array

New Feature

Improvement

  • [GODRIVER-300] - Support constructing *Value from time.Time instances
  • [GODRIVER-536] - Upgrade to Go 1.11
  • [GODRIVER-548] - Value.Interface() should return the underlying type for a Document
  • [GODRIVER-592] - Reverse Dependencies of bson and bsoncodec

MongoDB Go Driver Alpha 16

11 Oct 20:40
Compare
Choose a tag to compare
Pre-release

The MongoDB Go driver team is pleased to release the sixteenth alpha of the official Go driver.

This alpha release contains a new extended JSON implementation, an improved Sessions API, and an implementation of the BulkWrite API. Additionally, there are small API updates. 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.

Release Notes

Bug

  • [GODRIVER-562] - JSON decoding of an objectid returns error
  • [GODRIVER-564] - bson.EC.Time does not treat the zero time.Time value the same as the encoder
  • [GODRIVER-596] - Check value validity in isZero function

New Feature

Improvement

  • [GODRIVER-514] - Implement ExtJSON Reader using custom JSON parser & Implement extJSONValueReader and extJSONValueWriter
  • [GODRIVER-587] - Implement Improved Go Driver Sessions API
  • [GODRIVER-590] - objectid.ObjectID should support regular JSON hex bytes

MongoDB Go Driver Alpha 15

27 Sep 21:08
Compare
Choose a tag to compare
Pre-release

The MongoDB Go driver team is pleased to release the fifteenth alpha of the official Go driver.

This release contains splits the bson package into two packages, bson and bsoncodec. The new marshaling and unmarshaling logic is contained within the bsoncodec package. Version 1 of the marshaling and unmarshaling logic has been removed. This release also contains a change to how cursors behave, fixes MaxAwaitTime, and adds a Database method to mongo.Collection. 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.

Release Notes

Bug

  • [GODRIVER-266] - Properly implement maxAwaitTimeMS
  • [GODRIVER-558] - SSL option processing sets SSLCaFileSet when SSLCaFile is empty string
  • [GODRIVER-566] - Fix Equal method for bson.Value and update bson.Element.Equal to properly compare keys
  • [GODRIVER-567] - Decoding date into time.Time does not work

Epic

New Feature

  • [GODRIVER-568] - Add Database() method on mongo.Collection

Improvement

  • [GODRIVER-527] - Add BytesValueReader and BytesValueWriter interfaces
  • [GODRIVER-537] - Split bson package into bson and bsoncodec packages
  • [GODRIVER-551] - Use BSON Codecs in mongo package

MongoDB Go Driver Alpha 14

20 Sep 21:30
Compare
Choose a tag to compare
Pre-release

The MongoDB Go driver team is pleased to release the fourteenth alpha of the official Go driver.

This release contains a preview of the new BSON Encoder and Decoder types. This release also contains minor API changes. 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.

Release Notes

Bug

New Feature

Task

  • [GODRIVER-523] - Support new readConcern level "available"

Improvement

  • [GODRIVER-460] - Attempt to grow connection readBuf before allocating new buffer.
  • [GODRIVER-490] - Cursor.Next should call getMore in a loop until a document is available
  • [GODRIVER-495] - Implement BSON Registry
  • [GODRIVER-496] - Implement default struct tag handler
  • [GODRIVER-497] - Implement valueWriter and documentValueWriter
  • [GODRIVER-498] - Implement valueReader and documentValueReader
  • [GODRIVER-499] - Implement bson.Encoder/bson.Marshal*
  • [GODRIVER-500] - Implement bson.Decoder/bson.Unmarshal*
  • [GODRIVER-501] - Implement basic codecs
  • [GODRIVER-516] - Add default codecs for most reflect.Kind types
  • [GODRIVER-539] - Add BinaryOK function to the bson.Value type
  • [GODRIVER-546] - Deprecate eval helpers
  • [GODRIVER-547] - Resync read write concern tests to add new read concern levels

Sub-task

  • [GODRIVER-553] - Skip one-txt-record-multiple-strings spec test on Go 1.11

MongoDB Go Driver Alpha 13

06 Sep 21:27
Compare
Choose a tag to compare
Pre-release

The MongoDB Go driver team is pleased to release the thirteenth alpha of the official Go driver.

This release contains support for GridFS. This release also contains minor API changes. 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.

Release Notes

Bug

New Feature

Improvement

MongoDB Go Driver Alpha 12

23 Aug 19:55
Compare
Choose a tag to compare
Pre-release

The MongoDB Go driver team is pleased to release the twelfth alpha of the official Go driver.

This release contains support for retryable writes, transactions, and SCRAM-SHA-256. 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.

Release Notes

New Feature

Improvement

  • [GODRIVER-519] - Convert SCRAM-SHA-1 to use external scram library

MongoDB Go Driver Alpha 11

09 Aug 15:58
Compare
Choose a tag to compare
Pre-release

The MongoDB Go driver team is pleased to release the eleventh alpha of the official Go driver.

This release contains support for causal consistency and the new count API. Additionally, this release has bug fixes and small API changes. 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.

Release Notes

Bug

  • [GODRIVER-491] - Failure to establish connection when using only local certificate
  • [GODRIVER-510] - Documents larger than the MaxDocumentSize/MaxBSONObjectSize should cause error on InsertOne/InsertMany

New Feature