Here is a summary of changes:
- Authentication support, with great connection pooling integration.
This enables mgo to talk to protected servers and replica sets in a very
comfortable way. Even with a straightforward API, the authentication
is internally cached in a secure way to avoid constant roundtrips to the
database. The use of nonces is also optimized so that logins are usually
performed with a single roundtrip to the database.
For more details, check the relevant API documentation:
- Authentication is also supported through the URL provided to the Mongo
function, in the same way supported by the official drivers from 10gen:
- Several new methods to better support the MongoDB API:
- New gobson functions for generating ObjectIds, by Dmitry Chestnykh:
- New gobson function for working with hex ObjectId representations, also
by Dmitry Chestnykh:
- New *mgo.QueryError type is returned by Query.One and Iter.Next in the
err value in case the resulting document includes the $err key. This
is a common convention used by MongoDB in case of query errors, and
the new behavior integrates well with the common Go conventions for
- The Session.Restart method was renamed to Session.Refresh to better
reflect its meaning. The semantics remain the same:
- Improved documentation.
- 30+ new test cases.