func (repo *AccountAppxRepository) FindWhereAncestorIs(ancestor appx.Entity) *AccountQueryRunner {
	q := datastore.NewQuery(new(Account).KeySpec().Kind).Ancestor(ancestor.Key())
	return &AccountQueryRunner{
		db: repo.db,
		q:  q,
	}
}
Exemplo n.º 2
0
func toJSON(e appx.Entity) []byte {
	cachedEntity := &appx.CachedEntity{
		Entity: e,
		Key:    e.Key(),
	}
	json, _ := json.Marshal(cachedEntity)
	return json
}