How to search in the GQL Viewer in the appengine toolbar by key?

How to search in GQL Viewer in appengine toolbar by key?

I use this and it gives an error:

SELECT * FROM Cache where __key__ = KEY('Cache', 'ag9wYWdhbGd1eS1zdGF0aWNyHAsSBUNhY2hlIhEvYnV0dG9ucy9lZGl0LmdpZgw ')
+3
source share
2 answers

You pass what looks like an encoded key as the key name. Try "KEY ('ag9wYWdhbGd1eS1zdGF0aWNyHAsSBUNhY2hlIhEvYnV0dG9ucy9lZGl0LmdpZgw') instead.

+1
source

It seems important to use single quotes. This seems to work:

SELECT * FROM Cache where __key__ = KEY('ag9wYWdhbGd1eS1zdGF0aWNyHAsSBUNhY2hlIhEvYnV0dG9ucy9lZGl0LmdpZgw ')
0
source

Source: https://habr.com/ru/post/1731209/


All Articles