Selecting Objectify data from the Google DataStore using GSQL in the Developer Console -
i have objectify entity called userentity
contains object called user
. want dump last sync times , other data user objects bit of analysis. i'm trying in developers console using gsql can't work out how results want.
the query below works everything
select * userentity
using query get's keys
select __key__ userentity
this returns nothing, saying no data found.
select user userentity
but can't work out how (or if can) select individual properties objects. possible achieve in developer console, or shall write code it?
ideally i'd able like
select user.synctime, user.currentlevel userentity
stripped userentity
class below
@entity @cache public class userentity extends wordbuzzentity { @id private string facebookid; public user user = new user(null); private hashmap<string, date> accesstokens = new hashmap<string, date>(); }
this not how datastore fundamentally works. datastore key/value store indexing. values serialized protobufs. speaking, load entities whole , cannot pick/choose parts want.
there cleverness datastore can perform, selecting data directly out of index rather loading protobuf value. obvious keys-only query (the key part of every index). more sophisticated "projection" query looks sql select @ first glance, quite different animal , requires maintain special indexes. however, advanced performance optimization should not pursue unless really know doing. start simple model of loading whole entities.
Comments
Post a Comment