[英]How to Fetch all Entity Types in AppEngine
How can I retrieve all of the entity types from the datastore in appengine?如何从 appengine 中的数据存储区检索所有实体类型? For examaple, in my ORM I have defined:
例如,在我的 ORM 中,我定义了:
class Person(db.Model):
# fields here...
class Employee(db.Model):
# fields here...
I want a way to get "Employee" and "Person" in a list, but not the actual data.我想要一种在列表中获取“员工”和“人员”的方法,而不是实际数据。
Thanks in advance!提前致谢!
Look in http://code.google.com/appengine/docs/python/datastore/metadataqueries.html and look for查看http://code.google.com/appengine/docs/python/datastore/metadataqueries.html并寻找
q = Kind.all()
That's the snippet you need.这就是你需要的片段。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.