couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zachary Zolton <zachary.zol...@gmail.com>
Subject Re: Varnish and Multi-doc Fetch?
Date Mon, 14 Sep 2009 01:56:13 GMT
> This is related to a patch we need: a general JSON syntax for queries.
> The idea is that instead of POSTing an array of keys to a view, you'd
> post an array of query definition objects. This way you could do
> multiple ranges, and other things.

Interesting idea... As for the syntax, are you thinking something like this?

{
  "queries": [
    { "startkey": "foo", "endkey": "bar", "limit": 5 },
    { "startkey": "baz", "endkey": "qux", "limit": 42 }
  ]
}

Which would respond with:

{
  "results": [
    {
      "total_rows": 5,
      "offset": 0,
      "rows": [...]
    },
    {
      "total_rows": 42,
      "offset": 0,
      "rows": [...]
    },
  ]
}

Mime
View raw message