On Sun, Sep 13, 2009 at 6:56 PM, Zachary Zolton <[email protected]> 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
