> I am messing with google app engine queries being very new to it
> how can we match a string with __key__
> 'SELECT * FROM Person WHERE __key__=:bkey', bkey=str(value)
> This query is not working
> What is wrong with this?
>
You need to pass an instance of db.Key class as a parameter.
Is 'value' a string representation of the key? If so, the code will
look like this:
query = db.GqlQuery('SELECT * FROM Person '
'WHERE __key__ = :bkey',
bkey=db.Key(value))
See also
http://code.google.com/appengine/docs/datastore/queriesandindexes.html#Queries_on_Keys
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---