couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joscha Feth" <jos...@feth.com>
Subject Re: atomic/concurrent update_seq for _changes
Date Wed, 30 Dec 2009 01:33:28 GMT
Joscha Feth wrote:

> I am doing exactly the same in my application and the gap between #1
> and #2 also worried me - a special header sounds like a feasible
> solution and I can't see any downside besides the few bytes of
> overhead in the header for each request.


Just for the record: you can create a custom list/show function, which
adds the header:

"lists": {
mylist : "function(head, req) { start({\"code\": 200, \"headers\":
{\"X-Update-Seq\": (\"\"+req.info.update_seq)}}); send(\"whatever\"); }"
}

One comment: you need to convert the update_seq into a string before
sending it back via start() - might be a bug.

regards,
Joscha

-- 



Mime
View raw message