2
votes

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?

2
@Nick Johnson any input? - antony.trupe
I believe Riley is correct - stats, at least in the Java SDK, don't work in the dev server. - Nick Johnson

2 Answers

3
votes

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