Re: [Sqlalchemy-users] Building SQL joins...

2006-09-12 Thread Eric Brunson
Michael Bayer wrote: > > On Sep 11, 2006, at 6:37 PM, Eric Brunson wrote: > >> >> I want a list of columns that I can use in a query. I was thinking >> SA may already have a function that would build a column clause with >> foreign key references in it and maybe even generate the list of >> tab

Re: [Sqlalchemy-users] Building SQL joins...

2006-09-12 Thread Michael Bayer
On Sep 12, 2006, at 12:12 AM, Eric Brunson wrote: > > Oh, crap, I've offended you. I'm totally sorry, I have read a lot of > the documentation, all the tutorials and the example code, but I > didn't > fully appreciate everything it could do. no worries ! everyone knows im pathologically reac

Re: [Sqlalchemy-users] Building SQL joins...

2006-09-11 Thread Eric Brunson
Michael Bayer wrote: > > On Sep 11, 2006, at 6:37 PM, Eric Brunson wrote: > >> >> I want a list of columns that I can use in a query. I was thinking >> SA may already have a function that would build a column clause with >> foreign key references in it and maybe even generate the list of >> tab

Re: [Sqlalchemy-users] Building SQL joins...

2006-09-11 Thread Michael Bayer
On Sep 11, 2006, at 4:03 PM, Eric Brunson wrote: > I'm trying to convert some code I wrote over to using SA. I have code > that generates an HTML given the name of a table, it parses the > information_schema to get the structure of the table, then creates an SA supports reflection of tables usi

Re: [Sqlalchemy-users] Building SQL joins...

2006-09-11 Thread Eric Brunson
Eric Brunson wrote: > Hi All, > > > > def dereferenced_columns( self ): > columnnames = [] > derefcolumnstext = '' > for column in self.table.columns: > if column.foreign_key: > # do whatever it takes to figure out the foreign key > # and add it to my lis

[Sqlalchemy-users] Building SQL joins...

2006-09-11 Thread Eric Brunson
Hi All, I'm trying to convert some code I wrote over to using SA. I have code that generates an HTML given the name of a table, it parses the information_schema to get the structure of the table, then creates an SQL query to get the data and formats the table with the column names at the top