[sqlalchemy] order of the columns in table.__table__.columns._all_cols

2011-11-13 Thread Hanss
Hello, I'm trying to get the name of the columns of my tables, writing columnDb = self.table.__table__.columns._all_cols self.labels = [col.name for col in columnDb] ColumnDb is a Set Type... and it usually returns all the columns in the same order defined in the table...but not always.

[sqlalchemy] Re: order of the columns in table.__table__.columns._all_cols

2011-11-13 Thread Hanss
On 14 Nov, 03:19, Michael Bayer mike...@zzzcomputing.com wrote: When using Declarative, the order ultimately comes from the order in which each Column object was generated, which drives the order in which Declarative adds them to the Table which is then what you get when you iterate over