mongo-go-driver v1.3.0 Release Notes

Release Date: 2020-02-05 // about 4 years ago
  • ๐Ÿš€ The MongoDB Go driver team is pleased to release 1.3.0 of the official Go driver.

    ๐Ÿš€ This release contains new functions to construct BSON registries, a new BSON registry that mimics the behavior of the globalsign/mgo/bson library, and new URI options to specify TLS certificates and keys as separate files. As part of this release, support for Go modules has been added and the README has been changed to reflect this. There is still a vendor directory in the source code so projects can be compiled with versions of Go that do not support modules.

    ๐Ÿ“š Documentation can be found on GoDoc and the MongoDB documentation site. BSON library documentation is also available 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.

    mgo compatible BSON

    ๐Ÿ“š A new mgocompat package has been added under the top-level bson package. This package exports Registry, which is a BSON registry compatible with globalsign/mgo/bson and RegistryRespectNilValues, which is compatible with globalsign/mgo/bson with the RespectNilValues flag set to true. These registries can be used via the ClientOptions.SetRegistry method. The package also exports a RegistryBuilder for each of the registries so additional changes can be made. See the bson/bsoncodec package documentation for more information.

    RegistryBuilder method changes

    ๐Ÿ—„ The existing RegisterEncoder methods has been deprecated and replaced by RegisterTypeEncoder and RegisterHookEncoder. A corresponding change has been made for RegisterDecoder as well.

    ๐Ÿš€ Release Notes

    ๐Ÿ› Bug

    • [GODRIVER-1002] - Credential.PasswordSet doesn't work or is incorrectly documented
    • [GODRIVER-1411] - Data race between creating a new connection and disconnecting topology
    • [GODRIVER-1466] - Overriding the type map entry for embedded document does not work
    • [GODRIVER-1476] - mongodb+srv doesn't work with a fully qualified DNS name
    • โšก๏ธ [GODRIVER-1478] - Pooled sessions should have use time updated when retrieved from the pool

    ๐Ÿ†• New Feature

    • [GODRIVER-580] - Need to be able to unmarshall to bson.D field within a struct
    • [GODRIVER-917] - Difference in BSON/JSON serialization of nil primitive.D compared to mgo
    • [GODRIVER-1175] - allow BSON null values to decode into non-nilable Go types
    • [GODRIVER-1354] - Create ObjectIDCodec that accepts bsontype.String for decoding
    • ๐Ÿ‘ [GODRIVER-1356] - Support mgo's Getter and Setter interfaces
    • [GODRIVER-1358] - Add UIntCodec for mgocompat
    • [GODRIVER-1361] - Create mgocompat.Registry
    • [GODRIVER-1362] - Add SliceCodec for mgocompat

    Task

    • ๐Ÿ“„ [GODRIVER-904] - Improve docs for how to write custom codecs
    • [GODRIVER-938] - cannot convert types that use mgobson.ObjectId to new bson library.
    • [GODRIVER-1381] - GridFS GoDoc examples
    • โœ… [GODRIVER-1427] - Add more sessions tests with more read and write commands
    • ๐Ÿ“š [GODRIVER-1448] - Read operations options documentation

    ๐Ÿ‘Œ Improvement

    • ๐Ÿ‘ [GODRIVER-543] - Enable support for Go 1.11 modules
    • [GODRIVER-1421] - Add EmptyInterfaceCodec for mgocompat
    • [GODRIVER-1429] - add ByteArrayCodec for mgocompat
    • [GODRIVER-1430] - allow strings and binaries to decode to symbols
    • [GODRIVER-1433] - Add RespectNilValues equivalent for the mgo registry
    • [GODRIVER-1435] - Please add tlsCertificateFile and tlsKeyFile connection string options.
    • [GODRIVER-1438] - Separate RegisterEncoder/Decoder functions to "types" and "hooks"
    • [GODRIVER-1455] - Use a pure go implementation for zstd
    • [GODRIVER-1460] - Document mgocompat
    • [GODRIVER-1461] - Validate that mongocryptd is not spawned if bypassAutoEncryption=true