No you can't.
The entity stores as a pair of (key: value). You can only get both of them
at a same time.

I suggest you use a memcache:

index = memcache.get('index')
if not index:
  index = []
  result = query.fetch(15) # maybe you need do it several times
  index.append([e.key() for e in result])     # maybe you need
append several times
  memcache.set('index', index)

2009/4/15 mbac...@googlemail.com <mbac...@googlemail.com>

>
> Hello everyone, I would like to ask if there is any way to fetch only
> db.Key objects from a db.Query. I want to generate a list of links (a
> Google sitemap) that point to the place there all the data is shown.
> All the information to generate the link is part of the key name and
> therefore fetching hundreds of db.Model instances is not needed.
> Currently I can fetch around 15 instances, because of the datastore
> timeout limits. I am already using sitemapindexe's to split my sitemap
> into multiple HTTP requests, but I still need to fetch more than those
> ~15 key names to display all links.
>
> Any ideas? Thanks in advance.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to