couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damien Katz <dam...@apache.org>
Subject Re: Changing rev to _rev in view results (Was: Re: newbie question #1)
Date Mon, 29 Dec 2008 12:41:32 GMT
I disagree we should change this back. I don't know if anyone  
remembers, but this is how I implemented long ago in the first  
versions of the post-XML CouchDB. The problem was there where other  
reserved fields in documents that started with underscore, but in  
other places the fields wouldn't have an underscore. Keep track of  
which fieldname had underscores and where became confusing. The rule  
was changed to be simpler to understand and deal with. If it's in the  
root of a doc and it starts with underscore, it's reserved. You don't  
see the reserved underscore fields anywhere else, only in document top  
level.

-Damien


On Dec 28, 2008, at 2:21 PM, Jan Lehnardt wrote:

>
> On 28 Dec 2008, at 14:32, Antony Blakey wrote:
>
>>
>> On 28/12/2008, at 11:56 PM, Paul Davis wrote:
>>
>>> Why "id" and "rev" are used instead of "_id" and
>>> "_rev" I couldn't really tell you. I hate to say "historical  
>>> reasons"
>>> but I'm guessing that when Damien designed the view output he just
>>> labeled then "id" and "rev" without the underscore because it's not
>>> needed to distinguish from the rest of the doc.
>>
>> Desirable to change that (and any other inconsistencies) before a 1.0
>
> This keeps coming up and I've been advocating this for a while now:
>
> +1 for changing view result rows `rev` to `_rev` to avoid confusion.
>
> CC'ing dev@c.a.o.
>
> Cheers
> Jan
> --
>


Mime
View raw message