[ANN] mgo r2012.09.05

32 views
Skip to first unread message

Gustavo Niemeyer

unread,
Sep 5, 2012, 8:54:57 AM9/5/12
to golan...@googlegroups.com, mongod...@googlegroups.com, mgo-...@googlegroups.com
Greetings,

A new release of the mgo MongoDB driver for Go is out with
a few MongoDB 2.2 supporting features and a new feature
in the experimental transaction package.

Details about the driver may be found in its web page:

http://labix.org/mgo


The following changes were made in this release:

- The new aggregation framework was nealty integrated with
an interface resembling the existing querying mechanisms.
For example:

pipeline := []bson.M{{"$match": bson.M{"name": "Otavio"}}}
pipe := collection.Pipe(pipeline)

The resulting pipe value has familiar methods, such as
Iter, All, and One. See the documentation for details:

http://labix.org/v2/mgo#Collection.Pipe
http://labix.org/v2/mgo#Pipe.Iter
http://labix.org/v2/mgo#Pipe.All
http://labix.org/v2/mgo#Pipe.One

Documentation on the new aggregation feature of MongoDB:

http://docs.mongodb.org/manual/applications/aggregation


- The Index type has a new ExpireAfter field to enable the
use of TTL collections. For example:

index := mgo.Index{
Key: []string{"time"},
ExpireAfter: 5 * time.Minute,
}
err := collection.EnsureIndex(index)

For more details see the documentation:

http://labix.org/v2/mgo#Collection.EnsureIndex
http://labix.org/v2/mgo#Index

For details on TTL collections:

http://docs.mongodb.org/manual/tutorial/expire-data


- New Runner.ChangeLog method in the exprimental mgo/txn
package enables recording all changes applied via
transactions into a collection:

http://labix.org/v2/mgo/txn#Runner.ChangeLog


gustavo @ http://niemeyer.net

Octavian Covalschi

unread,
Sep 5, 2012, 9:51:16 AM9/5/12
to mongod...@googlegroups.com
Hi,

Any plans to change it's versioning scheme? It doesn't seem to fit this kind of software imho.

I mean, what if there is a bug in r2012.09.05? You're going to fix it, but nothing in it's naming/versioning says that it's a bug fix... or a new feature that's breaking other stuff.

PS: I just started to play with Go...


--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb

Gustavo Niemeyer

unread,
Sep 5, 2012, 10:19:08 AM9/5/12
to mongod...@googlegroups.com
On Wed, Sep 5, 2012 at 10:51 AM, Octavian Covalschi
<octavian....@gmail.com> wrote:
> I mean, what if there is a bug in r2012.09.05? You're going to fix it, but nothing in it's naming/versioning says that it's a bug fix... or a new feature that's breaking other stuff.

That's not true. The "v2" in the package URL is a guarantee that it
shouldn't break other stuff. If we have to break the API, v2 will
remain untouched and a v3 will show up, just like we had in the v1 >
v2 transition.

Otherwise, If you see consecutive releases on the same package URL,
you know that it's either a bug fix release, or new compatible
features. The summary at the top and the detailed description coverage
should give you plenty of information about whether you should upgrade
or not.

As a natural exception to those rules, we have the mgo/txn recently
released which is still tagged as experimental. This one may see
changes within the same package URL for the moment.

> Any plans to change it's versioning scheme? It doesn't seem to fit this kind of software imho.

As explained, that doesn't seem to be the case, and I think we're
doing pretty well for the moment.


gustavo @ http://niemeyer.net

Octavian Covalschi

unread,
Sep 5, 2012, 10:42:10 AM9/5/12
to mongod...@googlegroups.com
Aha, that makes more sense now, thanks. 

Reply all
Reply to author
Forward
0 new messages