couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <>
Subject Re: _update handler improvment
Date Sun, 14 Feb 2010 18:22:10 GMT
On Sun, Feb 14, 2010 at 1:09 AM, Benoit Chesneau <> wrote:
> While working on the couchapp, I'm currently thinking that
> _update handler could be improved. I would like to be able to return
> the doc revision and doc id from the doc we update/create/delete from
> _update. Actually this isn't possible since doc is created while we
> return the response.
> So current schema is :
> 1) update doc with _update, return response
> 2) get rev of doc with another call
> Of course it could be solved by a simple call to the db
> (PUT/POST/DELETE) but then I have to expose the db, and I have to do
> all work on client side. Which in my case isn't a real problem but
> could be in more sensitive application.
> I think we cold solve this by simply returning the doc id and rev as
> http headers which will solved most cases.

If we are going to do this we should make it consistent across the API.

We should also return the current db's update_seq in a header on all
doc / db responses.

And the current seq of the view index on each view response.


> Any thoughts about it ?
> - benoit

Chris Anderson

View raw message