couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <jch...@apache.org>
Subject Re: Varnish and Multi-doc Fetch?
Date Mon, 14 Sep 2009 05:26:58 GMT
On Sun, Sep 13, 2009 at 6:56 PM, Zachary Zolton
<zachary.zolton@gmail.com> wrote:
>> 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": [...]
>    },
>  ]
> }
>

That looks about right. I kinda mixed this up onto another thread, but
I'd love to see this patch, and I'm not the only one.

-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Mime
View raw message