couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Roebuck <paul_roeb...@comcast.net>
Subject Re: Need Strategy for Dealing with Large List Output
Date Fri, 19 Jul 2013 14:33:53 GMT
On Jul 18, 2013, at 9:19 AM, Paul Roebuck wrote:

> [SNIP]
> P.S. As something I just want to know, is there an issue with mixing
> start() with provides() inside a list function? Was surprised at the badarg
> exceptions...
> [SNIP]

Figured it out, but for anyone else, turns out the header values MUST
be character strings. I had (incorrectly) assumed CouchDB would
convert that for me...

list(head, req) {
  start({
      headers: {
//          "X-NRows": head.total_rows
          "X-NRows": "" + head.total_rows    // Convert to string
      }
  });

  provides("json") {
      // generate time consuming output
  }
  provides("xml") {
      // generate time consuming output
  }
}




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