Here's the full reference for GQL:

http://code.google.com/appengine/docs/python/datastore/gqlreference.html

There's no native OR query, but there is an 'IN' query which provides
functionality similar to 'OR'.

On Wed, Nov 25, 2009 at 9:18 AM, dhruvg <dhruv.g...@gmail.com> wrote:

> hey,
>
> i am trying to get data from the datastore in the following way;
>
> Object.get("WHERE x = :a OR y = :b", a = True, b = False)
>
> and I am getting the following error:
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \db\__init__.py", line 1008, in gql
>    *args, **kwds)
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \db\__init__.py", line 1828, in __init__
>    self._proto_query = gql.GQL(query_string, _app=app)
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \gql\__init__.py", line 192, in __init__
>    if not self.__Select():
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \gql\__init__.py", line 796, in __Select
>    return self.__From()
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \gql\__init__.py", line 817, in __From
>    return self.__Where()
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \gql\__init__.py", line 829, in __Where
>    return self.__FilterList()
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \gql\__init__.py", line 856, in __FilterList
>    return self.__OrderBy()
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \gql\__init__.py", line 1050, in __OrderBy
>    return self.__Limit()
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \gql\__init__.py", line 1092, in __Limit
>    return self.__Offset()
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \gql\__init__.py", line 1111, in __Offset
>    return self.__Hint()
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \gql\__init__.py", line 1134, in __Hint
>    return self.__AcceptTerminal()
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \gql\__init__.py", line 781, in __AcceptTerminal
>    self.__Error('Expected no additional symbols')
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \gql\__init__.py", line 721, in __Error
>    (error_message, self.__symbols[self.__next_symbol]))
> BadQueryError: Parse Error: Expected no additional symbols at symbol
> OR
>
> It looks like GAE doesn't support the 'OR' keyword... is there a way
> around this? Is there a way to combine results from two queries?
>
> Thanks in advance.
>
> --
>
> 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<google-appengine%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>
>


-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

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