incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Copenhaver <sean.copenha...@gmail.com>
Subject Re: updates document question
Date Mon, 30 May 2011 19:22:24 GMT
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
> 

Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message