uhah yea i believe i am

isnt the proper syntax WHERE property IN (foo, foo, foo) ?

On Mar 3, 2:38 am, ryan <ryanb+appeng...@google.com> wrote:
> On Mar 1, 11:06 am, pedepy <paul.ro...@gmail.com> wrote:
>
> > I would like to fetch results only against a particular subset of
> > keys. I'm trying to use 'WHERE __key__ IN (:1), list_of_keys ... the
> > gql object accepts that as a valid query, but returns no result..
>
> hmm, __key__ IN ... works for me. fromhttp://shell.appspot.com/:
>
> >>> class Foo(db.Expando):
>   pass
> >>> foos = Foo.all().filter('x >', 0).fetch(3)
> >>> keys = [f.key() for f in foos]
> >>> keys
>
> [datastore_types.Key.from_path('Foo', 32425L, _app=u'shell'),
> datastore_types.Key.from_path('Foo', 33376L, _app=u'shell'),
> datastore_types.Key.from_path('Foo', 33399L, _app=u'shell')]>>> got = 
> Foo.gql('where __key__ in :1', keys).fetch(3)
> >>> [f.key() for f in got]
>
> [datastore_types.Key.from_path('Foo', 32425L, _app=u'shell'),
> datastore_types.Key.from_path('Foo', 33376L, _app=u'shell'),
> datastore_types.Key.from_path('Foo', 33399L, _app=u'shell')]
>
> out of curiosity, are you actually including those parentheses around :
> 1 in your GQL query?
--~--~---------~--~----~------------~-------~--~----~
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-appengine@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