0

I am developing a Python app using Google App Engine. I want to retrieve property list from an entity along with the key. I am using the code below

recs = db.GqlQuery('select __key__,content from FileHistory')

but I am not able to get the key attribute. Does anybody know how to do it. Do I need to use any keyword to retrieve it.

Thanks,

Shay Erlichmen
  • 31,691
  • 7
  • 68
  • 87
Saqib
  • 2,470
  • 3
  • 19
  • 32

1 Answers1

2

If you meant to use projection query then you don't need to pass the request for key, it will returned with every query implicitly.

recs = db.GqlQuery('select content from FileHistory')
for rec in recs:
  print rec.key(), rec.content 
Shay Erlichmen
  • 31,691
  • 7
  • 68
  • 87