# HG changeset patch # User catherine@dellzilla # Date 1264606840 18000 # Node ID 8e822859e3a47af00908dd64562260bec62266a6 # Parent 439621c917c49e52ab76cea08538c54dbdba27fc tweaking ls hits diff -r 439621c917c4 -r 8e822859e3a4 sqlpython/connections.py --- a/sqlpython/connections.py Tue Jan 26 19:10:52 2010 -0500 +++ b/sqlpython/connections.py Wed Jan 27 10:40:40 2010 -0500 @@ -130,7 +130,7 @@ class OracleDatabaseInstance(DatabaseInstance): gerald_class = gerald.oracle_schema.User rdbms = 'oracle' - connection_parser = re.compile('(?P[^/\s]*)(/(?P[^/\s]*))?@((?P[^/\s:]*)(:(?P\d{1,4}))?/)?(?P[^/\s:]*)(\s+as\s+(?Psys(dba|oper)))?', + connection_parser = re.compile('(?P[^/\s@]*)(/(?P[^/\s@]*))?(@((?P[^/\s:]*)(:(?P\d{1,4}))?/)?(?P[^/\s:]*))?(\s+as\s+(?Psys(dba|oper)))?', re.IGNORECASE) connection_modes = {'SYSDBA': cx_Oracle.SYSDBA, 'SYSOPER': cx_Oracle.SYSOPER} oracle_connect_mode = 0 @@ -139,7 +139,7 @@ connectargs = self.connection_parser.search(arg) self.username = connectargs.group('username') self.password = connectargs.group('password') - self.db_name = connectargs.group('db_name') + self.db_name = connectargs.group('db_name') or os.getenv('ORACLE_SID') self.port = connectargs.group('port') or self.default_port self.host = connectargs.group('host') if self.host: diff -r 439621c917c4 -r 8e822859e3a4 sqlpython/exampleSession.txt --- a/sqlpython/exampleSession.txt Tue Jan 26 19:10:52 2010 -0500 +++ b/sqlpython/exampleSession.txt Wed Jan 27 10:40:40 2010 -0500 @@ -4,6 +4,10 @@ user testschema, password testschema, with the RESOURCE privilege (`GRANT RESOURCE TO testschema`). +SQL.No_Connection> set color off +colors - was: True +now: False + SQL.No_Connection> connect testschema/testschema@orcl 0:testschema@orcl> drop table play; /.*/ @@ -13,6 +17,7 @@ Executed +0:testschema@orcl> py import time; time.sleep(60) # allow metadata to load 0:testschema@orcl> INSERT INTO play VALUES ('Twelfth Night', 'Shakespeare'); Executed (1 rows) diff -r 439621c917c4 -r 8e822859e3a4 sqlpython/sqlpyPlus.py --- a/sqlpython/sqlpyPlus.py Tue Jan 26 19:10:52 2010 -0500 +++ b/sqlpython/sqlpyPlus.py Wed Jan 27 10:40:40 2010 -0500 @@ -1538,13 +1538,6 @@ def _matching_database_objects(self, arg, opts): # doesn't get java$options - if opts.get('immediate'): #TODO - if opts.get('all'): - self.perror('Cannot combine --all with --immediate - operation takes too long') - raise StopIteration - else: - self.pfeedback('Refreshing metadata for %s...' % username) - schemas.refresh_one(username) (username, gerald_schema) = self.metadata() self._print_gerald_status_warning(gerald_schema)