couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <>
Subject _update handler improvment
Date Sun, 14 Feb 2010 09:09:20 GMT
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.

Any thoughts about it ?

- benoit

View raw message