Apologies for any lack of knowledge as I'm quite new at this.

I have written a basic request handler which retrieves objects from
the datastore using a GQL query. (yay!)

I now want to examine these objects to determine what properties they
may have. For example, I may have run "SELECT * from WIDGETS" and
gotten back a collection of entities which may or may not all share
the same model. In the first instance, let's just assume my database
is built out of strings, and that all I want to do is display these in
a web page.

How can I get a list of the name of all of the attributes of an
entity, so that I can print this to a web page, alongside the value of
the names attribute?

Something along the lines of:

queryString = "SELECT * from WIDGETS"
resultSet = db.GqlQuery(queryString)

for result in resultSet:
    for attributeName, attributeValue in result:
        print attributeName, attributeValue

Of course that doesn't work, but it shows what I want to do, which is
iterate over the key/value pairs which are the attributes.

Thanks,
-Tennessee

-- 
--------------------------------------------------
Tennessee Leeuwenburg
http://myownhat.blogspot.com/
"Don't believe everything you think"

--~--~---------~--~----~------------~-------~--~----~
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