In a GQL link, it is recommended to use a keyword INwith a list of values and build a key from a GQL query hand
SELECT * FROM MyModel WHERE __key__ = KEY('MyModel', 'my_model_key')
will be successful. However, using the code you expect to work:
SELECT * FROM MyModel WHERE __key__ IN (KEY('MyModel', 'my_model_key1'),
KEY('MyModel', 'my_model_key2'))
in the Datastore Viewer, there is a complaint about the Invalid GQL query string.
What is the correct way to format such a request?
UPDATE: This cannot be done with the current SDK. As I note in my comment, when using a list, only links (for example, :1or :email) or int, float, string, boolean or null are acceptable .
SECOND UPDATE: I fixed the error, and now you can execute such requests. The fix can be found on the Google Code diff host .
PS , Python ( GQL) remote_api, remote_api . , () , .