couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Wolff <awo...@gmail.com>
Subject Re: CouchDB equivalent dynamic SQL
Date Fri, 30 Oct 2009 17:59:18 GMT
If there's a limited number of TYPEs, then emit a view like this:
 emit([doc.type, doc.price], ...

and query like /.../_view/...?startkey=["tv", 100]&endkey=["tv",1000]

A

On Fri, Oct 30, 2009 at 10:36 AM, Duy Nguyen <duynguyen0511@yahoo.com>wrote:

> Hi guys,
> I have a troublesome sql query that needs to translate to couchDB
> map/reduce
> SELECT * FROM PRODUCTSWHERE [ PRICE ] AND [TYPE]'
> Please note that Price and Type are dynamically generated depend on user
> inputs. ( i.e TYPEcan be 100 < PRICE < 1000, or 1 < PRICE < 100, or 1000
> < PRICE < 10000. TYPE could be 'computer' , 'tv' etc..)
> I can not do dynamically query on the fly with CouchDB. what is the best
> way to solve this problem ?
>
>
>

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