changeset 384:b9fedbfbec79

ls now works with suggested changes to Gerald
author catherine@cordelia
date Fri, 02 Oct 2009 14:10:57 -0400
parents 18330ebc1cc4
children 846a59c10cf4
files sqlpython/schemagroup.py sqlpython/sqlpyPlus.py sqlpython/sqlpython.py
diffstat 3 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/sqlpython/schemagroup.py	Wed Sep 02 10:12:17 2009 -0400
+++ b/sqlpython/schemagroup.py	Fri Oct 02 14:10:57 2009 -0400
@@ -21,6 +21,7 @@
                 ):
                 self.schemas[schemaname] = self.childtype(schemaname,
                                                           self)
+'SELECT owner, max(last_ddl_time) FROM all_objects GROUP BY owner'
 
 
 class OracleSchema(gerald.OracleSchema):
--- a/sqlpython/sqlpyPlus.py	Wed Sep 02 10:12:17 2009 -0400
+++ b/sqlpython/sqlpyPlus.py	Fri Oct 02 14:10:57 2009 -0400
@@ -1441,9 +1441,11 @@
         '''
         seek = '^%s$' % (arg.replace('*', '.*').replace('?','.'). \
                          replace('%', '.*'))
-        gerald = self.connections[self.connection_number]['gerald']
+#        import pdb; pdb.set_trace()
+        schemas = self.connections[self.connection_number]['schemas'].schemas
+        schema = schemas[self.connections[self.connection_number]['user']].schema
         result = []
-        for (name, obj) in gerald.schema.items():
+        for (name, obj) in schema.items():
             if hasattr(obj, 'type'):
                 dbtype = obj.type
             else:
--- a/sqlpython/sqlpython.py	Wed Sep 02 10:12:17 2009 -0400
+++ b/sqlpython/sqlpython.py	Fri Oct 02 14:10:57 2009 -0400
@@ -9,7 +9,7 @@
 # See also http://twiki.cern.ch/twiki/bin/view/PSSGroup/SqlPython
 
 import cmd2,getpass,binascii,cx_Oracle,re,os,platform
-import sqlalchemy, pyparsing
+import sqlalchemy, pyparsing, schemagroup
 __version__ = '1.6.8'    
 
 class Parser(object):