What would be the most natural way of specifying an ordering for columns?
I'm not looking for ordering the result of a query but defining an
ordering for the columns at the time of defining class mytable(
SQLObject ). This would be some kind of metadata I'd like to store
with each class. For example, the order in which each column is
defined would be a good way of doing it:
class mytable( SQLObject ):
first = StringCol( )
second = StringCol( )
third = StringCol( )
But how do I make mytable remember this order?
The reason I need this is that I'm developing a database viewer (each
table will be shown as a grid) and I'd like to have a simple way of
defining the order of the columns that should appear in the grid.
Any ideas?
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
|