On Fri, May 22, 2009 at 7:01 AM, [email protected] <
[email protected]> wrote:

>
> Hi,
>
> I want to use the filtering like that:
>
>
> # The Query interface prepares a query using instance methods.
> q = Person.all()
> q.filter("last_name =", "Smith")
> q.filter("last_name =", "Doe")
>
>
> Obviously I and an OR filter - Smith OR Doe. Is this possible without
> using the SQL like syntax?
>

You can use the IN
filter<http://code.google.com/appengine/docs/python/datastore/queryclass.html#Query_filter>for
this. Note that this, like '!=', is not natively supported by
datastore,
it's just improvised in the client lib.

A generic OR does not exist in datastore, but usually you can model your
classes in such a way that you don't need it.

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

Reply via email to