Hello all,
The release r2013.01.20 of the mgo MongoDB driver for Go is out
with fixes and minor improvements.
Details about the driver may be found in its web page:
http://labix.org/mgo
The following changes were made in this release:
- Ensure open cursor is killed before finishing an iterator with
limit. Issue reported by Andrew Bonventre.
- Fixed bson's omitempty handling on float values, as reported
by Otto Bretz.
- New bson.IsObjectIdHex function to verify whether a given
string is a valid hex representation of an object id. This is useful
in conjunction with the ObjectIdHex function, which panics on
invalid ids. More details in the documentation:
http://labix.org/v2/mgo/bson#IsObjectIdHex
- The DialWithInfo function was fixed so it dials to the standard
MongoDB port if the address doesn't inform one. Thanks to
Mark Severson for reporting the issue.
More details about the function at:
http://labix.org/v2/mgo#DialWithInfoo
- In preparation for 2.4, which is coming with multiple new index
types, the format of 2D indexes as accepted by
Collection.EnsureIndex and returned by Collection.Indexes was
changed from "@field" to "$2d:field", and the index type is not
validated before being sent to the server. Parsing of the old
style is still maintained for compatibility.
More details about index creation is available in the documentation:
http://labix.org/v2/mgo#Collection.EnsureIndex
- Added a note to the GridFile.Write method explaining that errors
may be delayed until a future Write or Close due to chunking,
as suggested by Ian Ragsdale.
- Fixed typo in documentation sample. Contributed by Livio Soares.
gustavo @
http://niemeyer.net