Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Announcing mgo r2011.05.12 with map/reduce support
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gustavo Niemeyer  
View profile  
 More options May 12 2011, 2:24 am
From: Gustavo Niemeyer <gust...@niemeyer.net>
Date: Thu, 12 May 2011 08:24:51 +0200
Local: Thurs, May 12 2011 2:24 am
Subject: Announcing mgo r2011.05.12 with map/reduce support
The r2011.05.12 release of the mgo MongoDB driver for Go is
now available:

    http://labix.org/mgo

Here is a list of changes in this release:

- Comfortable support for MapReduce was implemented.

  This trivial example will count the number of occurrences of a
  field named n on each document in a collection, and will
  return results inline:

      job := mgo.MapReduce{
          Map:    "function() { emit(this.n, 1) }",
          Reduce: "function(key, values) { return Array.sum(values) }",
      }
      var result []struct { Id int "_id"; Value int }
      _, err := collection.Find(nil).MapReduce(job, &result)
      if err != nil {
          panic(err)
      }
      for _, item := range result {
          fmt.Println(item.Value)
      }

  For more details, check the documentation:

      http://goneat.org/lp/mgo#Query.MapReduce
      http://goneat.org/lp/mgo#MapReduce
      http://goneat.org/lp/mgo#MapReduceInfo

- New Distinct method for querying collections for distinct values:

      http://goneat.org/lp/mgo#Query.Distinct

- After feedback and debate in the mailing list, gobson will again
  marshal (u)int64 values as int64 MongoDB values, even if they
  would fit in an int32 value for storage. But then:

- gobson now supports a "/s" suffix in struct fields, and will
  conditionally marshal int64 values in these fields in the
  shortest possible space.

- New gobson Raw.Unmarshal function for unmarshalling individual
  elements of a document lazily and conditionally:

      http://goneat.org/lp/gobson/bson#Raw.Unmarshal

--
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/blog
http://niemeyer.net/twitter


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »