couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Louis Gerbarg (JIRA)" <>
Subject [jira] Created: (COUCHDB-273) view rows should be able to include _rev
Date Sun, 01 Mar 2009 12:01:12 GMT
view rows should be able to include _rev

                 Key: COUCHDB-273
             Project: CouchDB
          Issue Type: Improvement
          Components: JavaScript View Server
            Reporter: Louis Gerbarg

In our project we use maps in order to group objects, but do not generate any interesting
any meaningful data to return from the mapping function aside from the sorted ordering. Our
client basically does a GET against the view to determine what objects are in for a key. It
has a local cache, and currently it then HEADs every object returned by that view to see if
the objects need to be reloaded. If the rev was included in the row that would be unnecessary.
Currently we are intending to return { "rev" : doc._rev } out of the mapping function, but
the seems a bit clumsy.

Jan suggested in irc that maybe the correct thing to do is to remove the "_id" from the roes
by default and add both "_rev" and "_id" with an option (include_meta=true). This approach
seems good to me, since I suspect people who are using views to manipulate the data in interesting
ways generally don't need the object ids, and people who are using views primarily to organize
objects almost always need the rev in addition to the object id.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message