There is currently no way to retrieve only parts of entities, nor just keys,
from the datastore in response to queries.  There's no way to dig out the
keys either: the datastore returns the full entities in response to queries,
there is no intermediate app-side step that fetches entities for keys.
The datastore is designed with the expectation that the complete entity is
needed as the result of a query.  If you're storing many facts about a
notional thing (such as a product in a catalog), and you only need some of
those facts back in response to a query, you may want to represent the thing
using multiple entities.  Depending on the nature of the queries, the
entities for a thing may store duplicate information.  You can manage this
duplication using the Python class API and transactions.

For what it's worth, I was once an engineer in the catalog department of a
major online retailer, and we used a similar technique for "fast" product
data, which showed up in search and browser results and the like, and "slow"
product data which was only needed on the product page.

-- Dan

On Thu, Jan 8, 2009 at 2:00 PM, Tzakie <[email protected]> wrote:

>
> >Similarly, if you want the query to return
> >just the keys, you'll need entities containing the properties that are the
> >subjects of query filters and the keys for the full entities.
>
> so there is no way to
>
> QueryString="SELECT * FROM USER_INVENTORY WHERE TUSER_ID=432 AND
> CATEGORY_ID=23423"
> CategoryRows = db.GqlQuery(QueryString)
>
> KeyNames=CategoryRows.getKeyNames()
>
> Without creating separate entities?
>
> That's crazy. There must be a way to dig the identifiers out of the
> db.GqlQuery() return.
>
> Unless you can get the keys out and memcache I'm beginning to think
> beyond trivial
> applications app engine is just unusable. I've put so much time into
> this some expert
> person help me out here please.
>
> >
>

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

Reply via email to