I'm assuming that rooms and floor are integers, that is, you want the
entries which have rooms=3 and 4, and floor = 1 and 2. With this
assumption you one can construct a query which only have one
inequality:

SELECT * FROM house WHERE cost > 50000 AND cost < 150000 AND rooms IN
(3, 4) AND floor IN (1, 2)

Worth noting is that this query is actually executed as 4 queries (one
for each combination of IN-parameters). Apart from the additional
performance, AppEngine limits the number of "subqueries" like this to
25 (if I remember correctly). So you can't scale this to any number of
rooms/floors if you need to.

On 19 Sep, 08:11, "GAE-framework.googlecode.com"
<anton.danilche...@gmail.com> wrote:
> Hillo GAE developers!
>
> I have a serious situation with datastore. I need select data from
> model with multiple criteria. I have a House model, where exists
> fields: cost, rooms, floor. I need filter all houses, where cost >
> 50000 and < 150000, and also rooms > = 3 and < 5, and also floor >= 1
> and < 3.
>
> How can I select this dataset? As I see, the Datastore says that I can
> use filter criteria with >, <, >=, <= and != only on one column. But I
> reallly need use this rules on multiple columns.
>
> Please, help me!!!
> How to implement my task with Datastore limitations?
>
> Thank you. I really need your help.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to