开发者

app engine datastore stats on development server

I'm trying to get a list of entity types that have been persisted as documented, but the queries do not return any results on the development server.

DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
PreparedQuery kindStats = datastore.prepare(new Query("__Stat_Kind__"));

for (Entity kindStat : kindStats.asList(withDefaults())) {
  String kind_name = (String) kindStat.getProperty("kind_name");
}

Nor does this work on the development server:

DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
Entity globalStat = datastore.prepare(new Query("__Stat_Total__")).asSingleEntity开发者_开发百科();
Long totalBytes = (Long) globalStat.getProperty("bytes");
Long totalEntities = (Long) globalStat.getProperty("count");

Is there another way to do this, or is it not supposed to be possible?


I'm sorry I can't find the documentation to support this belief, but I believe that:

  • stats don't work on the development server right now
  • Google is planning on making them work before too long


This url below can help you:

PreparedQuery.countEntities() clarifications

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜