You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Louis Gerbarg (JIRA)" <ji...@apache.org> on 2009/03/01 13:01:12 UTC

[jira] Created: (COUCHDB-273) view rows should be able to include _rev

view rows should be able to include _rev
----------------------------------------

                 Key: COUCHDB-273
                 URL: https://issues.apache.org/jira/browse/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.


[jira] Commented: (COUCHDB-273) view rows should be able to include _rev

Posted by "Antony Blakey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677804#action_12677804 ] 

Antony Blakey commented on COUCHDB-273:
---------------------------------------

I would like to see the rev in view rows, but for a different reason, namely exposing the view results as immutable values. There was a thread on this here: http://mail-archives.apache.org/mod_mbox/couchdb-dev/200901.mbox/%3c9F8937BF-9332-416C-BA01-4B1D001EA029@gmail.com%3e

> view rows should be able to include _rev
> ----------------------------------------
>
>                 Key: COUCHDB-273
>                 URL: https://issues.apache.org/jira/browse/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.


[jira] Closed: (COUCHDB-273) view rows should be able to include _rev

Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Anderson closed COUCHDB-273.
----------------------------------

    Resolution: Fixed

this has been fixed for a while. Now you can use _id and _rev in view values to direct include docs. This is think satisfies the request.

> view rows should be able to include _rev
> ----------------------------------------
>
>                 Key: COUCHDB-273
>                 URL: https://issues.apache.org/jira/browse/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.