incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bykov <m.by...@gmail.com>
Subject Re: updates document question
Date Tue, 31 May 2011 10:49:13 GMT
2011/5/30 Sean Copenhaver <sean.copenhaver@gmail.com>:
> I'm not completely sure what you are asking, but if you are trying to load or modify
multiple documents with an update function I don't believe you can.
>
> You are allowed to create a new doc, modify the passed in doc, or do nothing (so long
as you return [null, response]). If you want to retrieve a document, perform logic on them,
then save, I believe you have to do that on the client and you can save them both at once
using _bulk_docs API.
>

> https://wiki.apache.org/couchdb/HTTP_Bulk_Document_API#Modify_Multiple_Documents_With_a_Single_Request
>
>
> --
> Sean Copenhaver
> Sent with Sparrow
> On Monday, May 30, 2011 at 2:25 PM, Michael Bykov wrote:
>> Sorry, I am a complete newbie in couchdb.
>>
>> I am in update function
>>
>> function(doc, req) {
>>  doc.att = other_doc.att
>>  return [doc, "updated doc"];
>> }
>>
>>
>> How I can get other_doc in my update function?
>>
>>
>> --
>> М.
>>
>> http://diglossa.org
>> xmpp://m.bykov@jabber.ru
>>
>


Thank you, Sean, ok


-- 
М.

http://diglossa.ru
xmpp://m.bykov@jabber.ru

Mime
View raw message