/[gnue]/gnue-common/src/datasources/drivers/db2/Schema/Discovery/Introspection.py
ViewVC logotype

Diff of /gnue-common/src/datasources/drivers/db2/Schema/Discovery/Introspection.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.1 by jcater, Fri Oct 10 01:21:12 2003 UTC revision 1.1.2.2 by jcater, Wed Nov 19 03:00:24 2003 UTC
# Line 86  class Introspection(GIntrospection.Intro Line 86  class Introspection(GIntrospection.Intro
86    
87      GDebug.printMesg(5,statement)      GDebug.printMesg(5,statement)
88    
89      cursor = self.cursor()      cursor = self._connection.native.cursor()
90      cursor.execute(statement)      cursor.execute(statement)
91    
92      list = []      list = []
93      for rs in cursor.fetchall():      for rs in cursor.fetchall():
94        list.append(GDataObjects.Schema(attrs={'id':string.lower(rs[0]), 'name':rs[1],        list.append(GIntrospection.Schema(attrs={'id':string.lower(rs[0]), 'name':rs[1],
95                           'type':rs[2]},                           'type':rs[2]},
96                           getChildSchema=self.__getFieldSchema))                           getChildSchema=self.__getFieldSchema))
97    
# Line 120  class Introspection(GIntrospection.Intro Line 120  class Introspection(GIntrospection.Intro
120    
121      GDebug.printMesg(5,statement)      GDebug.printMesg(5,statement)
122    
123      cursor = self.cursor()      cursor = self._connection.native.cursor()
124      cursor.execute(statement)      cursor.execute(statement)
125    
126      list = []      list = []
127      for rs in cursor.fetchall():      for rs in cursor.fetchall():
128        list.append(GDataObjects.Schema(attrs={'id':string.lower(rs[0]), 'name':rs[1],        list.append(GIntrospection.Schema(attrs={'id':string.lower(rs[0]), 'name':rs[1],
129                           'type':rs[2]},                           'type':rs[2]},
130                           getChildSchema=self.__getFieldSchema))                           getChildSchema=self.__getFieldSchema))
131    
# Line 146  class Introspection(GIntrospection.Intro Line 146  class Introspection(GIntrospection.Intro
146    
147      schema, name, type = string.split(parent.id,'.')      schema, name, type = string.split(parent.id,'.')
148    
149      cursor = self.cursor()      cursor = self._connection.native.cursor()
150    
151      if type == 'a':      if type == 'a':
152        statement = "select base_tabschema, base_tabname " + \        statement = "select base_tabschema, base_tabname " + \
# Line 190  class Introspection(GIntrospection.Intro Line 190  class Introspection(GIntrospection.Intro
190        if rs[5] != 0:        if rs[5] != 0:
191          attrs['length'] = rs[4]          attrs['length'] = rs[4]
192    
193        list.append(GDataObjects.Schema(attrs=attrs))        list.append(GIntrospection.Schema(attrs=attrs))
194    
195      cursor.close()      cursor.close()
196      return tuple(list)      return tuple(list)

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26