Re: getting columns attributes in declarative style with sqlalchemy

2011-11-01 Thread tres . bailey
Hi Gabriele, I'm not an Alchemy expert, but I have used the ColumnProperty of the model/column objects to solve this problem in the past. So to get the column name for the description column in your example above, you would use the following syntax: Country.description.property.columns[0].nam

Re: getting columns attributes in declarative style with sqlalchemy

2011-11-01 Thread tres . bailey
Sorry for the repost, if it does in fact repost. I'm no SQLAlchemy expert, but I have used the Table and Column attribute objects from the model object to solve a similar problem in the past. You can use the following syntax to do it: [col.name for col in Country.__table__.columns._all_cols]