quick query question

21 views
Skip to first unread message

lars van gemerden

unread,
Oct 28, 2013, 12:44:48 PM10/28/13
to sqlal...@googlegroups.com
Hi,

Short question: when does e.g. query.all() returns a list of objects and when it returns a list of NamedTuple's?

is it only after you call add_columns() on the query that all() starts returning NamedTuple's? 

Cheers, Lars

Michael Bayer

unread,
Oct 28, 2013, 1:12:54 PM10/28/13
to sqlal...@googlegroups.com
the list of objects are for when the query is set to return exactly one mapped class.  query.column_descriptions will show this.


--
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.
To post to this group, send email to sqlal...@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Lars van Gemerden

unread,
Oct 28, 2013, 2:45:55 PM10/28/13
to sqlal...@googlegroups.com
Thanks again ..

====================================
Lars van Gemerden
+31 6 26 88 55 39
====================================
You received this message because you are subscribed to a topic in the Google Groups "sqlalchemy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sqlalchemy/If3XeRoBh6w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sqlalchemy+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages