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-levelbson
package. This package exportsRegistry
, which is a BSON registry compatible withglobalsign/mgo/bson
andRegistryRespectNilValues
, which is compatible withglobalsign/mgo/bson
with theRespectNilValues
flag set to true. These registries can be used via theClientOptions.SetRegistry
method. The package also exports aRegistryBuilder
for each of the registries so additional changes can be made. See thebson/bsoncodec
package documentation for more information.RegistryBuilder
method changes๐ The existing
RegisterEncoder
methods has been deprecated and replaced byRegisterTypeEncoder
andRegisterHookEncoder
. A corresponding change has been made forRegisterDecoder
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