incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From go canal <goca...@yahoo.com>
Subject is there a way to pass a request parameter to a view ?
Date Wed, 23 Sep 2009 09:37:15 GMT
Hello,
use case:
  - change the value of a field of documents

question:
  is there a way to pass a request parameter to the view ?

I would imagine some like this:
  /db/view?key=value
then in the view function (doc) {
   if (doc match some criteria)
     doc.Type = value;
}
in the reduce function, I can then return the # of changed documents....

But the view function only accepts one argument 'doc'. 

Do I have to get a list, then get each document, then put ? does not seem to be efficient.

 rgds,
canal



      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message