incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Landolt <d...@deanlandolt.com>
Subject Re: put and no _rev
Date Fri, 06 Mar 2009 16:54:27 GMT
On Fri, Mar 6, 2009 at 11:50 AM, aju <aju@muly.dk> wrote:

> hi
>
> [first post to this list]
>
> either i am missing the obvious or otherwise this might be a feature
> request ;)
>
> it would be convenient if one could PUT an existing document without
> supplying a _rev number.
>
> the argument for supplying the _rev number appears to be so that couchDB
> can apply a it's diff mechanism based on that particular revision - much
> like a MVCC.


*Exactly *like MVCC. That's what the revs are for. There's no diff mechanism
in couch.

>
>
> in case of a PUT where one doesn't supply the _rev number, couchDB should
> then just assume and use "last revision number" as a base (i guess "last" is
> known server side looking at Futon).
>
> otherwise one have to first figure out which revision is latest (1.
> request) plus then update the document (2. request).
>
> makes sense ?


If you mean do the two requests make sense, then yes. Or better yet, you
could just try to put, and if it fails, request the latest rev and give it
to your user to merge (or if you can do so algorithmically, then have at
it).

>
>
> thanks
> ./allan
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message