Hi Stephen, My mistake. There's a simple reason this isn't implemented: Because IN queries and inequalities are split into separate queries on the backend, then merged into a single resultset in userspace, the userspace code has to be able to run the merge algorithm to preserve the correct order of the results. Since a keys-only query returns only the key and not the entity it applies to, there's no way to correctly order the returned results in userspace.
One possible enhancement to the SDK would be to not throw the error when there are no sort criteria or inequality filters, since the merge can be done normally in that case. Future datastore work is likely to make this obsolete, though, by pushing some of this functionality back into the datastore backend. -Nick Johnson On Thu, Jan 27, 2011 at 11:12 AM, Stephen Johnson <[email protected]>wrote: > Hi Nick, > You can go to the datastore viewer and do a GQL query like: > > SELECT __key__ FROM ENTITY-KIND where PROPERTY-NAME IN ('SOME-VALUE') > > and you get the error > > *Keys only queries do not support IN or != filters. > > * > On Wed, Jan 26, 2011 at 4:01 PM, Nick Johnson (Google) < > [email protected]> wrote: > >> They should not - what exception do you get? >> >> -Nick Johnson >> >> >> On Thu, Jan 27, 2011 at 9:07 AM, Cesare Montresor < >> [email protected]> wrote: >> >>> Ha, ok, so you can't get the point too about why the first 2 query >>> trigger an exception... right ? >>> >>> >>> On 26 January 2011 22:56, Matija <[email protected]> wrote: >>> > There is no reason. >>> > SELECT __key__ will stop after finding location in index table. SELECT >>> * >>> > will do additional one jump after same index table position to entity >>> > location. >>> > >>> > -- >>> > 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]<google-appengine%[email protected]> >>> . >>> > For more options, visit this group at >>> > http://groups.google.com/group/google-appengine?hl=en. >>> > >>> >>> -- >>> 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]<google-appengine%[email protected]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/google-appengine?hl=en. >>> >>> >> >> >> -- >> Nick Johnson, Developer Programs Engineer, App Engine >> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: >> 368047 >> >> -- >> 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]<google-appengine%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-appengine?hl=en. >> > > -- > 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]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- 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.
