Re: More general way of generating PyODBC queries as a dict?

2013-05-22 Thread stackoverflowuser95
On Wednesday, May 22, 2013 9:33:18 AM UTC+10, Dennis Lee Bieber wrote: > On Tue, 21 May 2013 10:27:07 -0700 (PDT), stackoverflowuse...@gmail.com > > declaimed the following in gmane.comp.python.general: > > > > > > > > For example, when multiple tables are queried; some hackish lambdas are >

More general way of generating PyODBC queries as a dict?

2013-05-21 Thread stackoverflowuser95
Here are my averagely general class methods for creating a dictionary from the result of database queries: def make_schema_dict(self): schema = [i[2] for i in self.cursor.tables() if i[2].startswith('tbl_') or i[2].startswith('vw_')] self.schema = {table: {'scheme': [row.co