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

Diff of /gnue-common/src/datasources/drivers/oracle/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:24 2003 UTC revision 1.1.2.2 by jcater, Wed Nov 19 03:00:24 2003 UTC
# Line 87  class Introspection(GIntrospection.Intro Line 87  class Introspection(GIntrospection.Intro
87    
88      GDebug.printMesg(5,statement)      GDebug.printMesg(5,statement)
89    
90      cursor = self.native.cursor()      cursor = self._connection.native.cursor()
91      cursor.execute(statement)      cursor.execute(statement)
92    
93      list = []      list = []
94      for rs in cursor.fetchall():      for rs in cursor.fetchall():
95        list.append(GDataObjects.Schema(attrs={'id':rs[0], 'name':string.lower(rs[1]),        list.append(GIntrospection.Schema(attrs={'id':rs[0], 'name':string.lower(rs[1]),
96                           'type':rs[2]},                           'type':rs[2]},
97                           getChildSchema=self.__getFieldSchema))                           getChildSchema=self.__getFieldSchema))
98    
# Line 117  class Introspection(GIntrospection.Intro Line 117  class Introspection(GIntrospection.Intro
117    
118      GDebug.printMesg(5,statement)      GDebug.printMesg(5,statement)
119    
120      cursor = self.native.cursor()      cursor = self._connection.native.cursor()
121      cursor.execute(statement)      cursor.execute(statement)
122    
123      list = []      list = []
124      rs = cursor.fetchone()      rs = cursor.fetchone()
125      if rs:      if rs:
126        rv = GDataObjects.Schema(attrs={'id':rs[0], 'name':string.lower(rs[1]),        rv = GIntrospection.Schema(attrs={'id':rs[0], 'name':string.lower(rs[1]),
127                           'type':rs[2]},                           'type':rs[2]},
128                           getChildSchema=self.__getFieldSchema)                           getChildSchema=self.__getFieldSchema)
129      else:      else:
# Line 138  class Introspection(GIntrospection.Intro Line 138  class Introspection(GIntrospection.Intro
138    
139      owner, name, type = string.split(parent.id,'.')      owner, name, type = string.split(parent.id,'.')
140    
141      cursor = self.native.cursor()      cursor = self._connection.native.cursor()
142    
143      if type == 'SYNONYM':      if type == 'SYNONYM':
144        statement = "select table_owner, table_name, " + \        statement = "select table_owner, table_name, " + \
# Line 185  class Introspection(GIntrospection.Intro Line 185  class Introspection(GIntrospection.Intro
185          if int(rs[4]):          if int(rs[4]):
186            attrs['length'] = int(rs[4])            attrs['length'] = int(rs[4])
187    
188        list.append(GDataObjects.Schema(attrs=attrs))        list.append(GIntrospection.Schema(attrs=attrs))
189    
190      cursor.close()      cursor.close()
191      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