Mercurial > sqlpython
changeset 434:8e822859e3a4
tweaking ls hits
author | catherine@dellzilla |
---|---|
date | Wed, 27 Jan 2010 10:40:40 -0500 |
parents | 439621c917c4 |
children | 5443c5d5ed8c |
files | sqlpython/connections.py sqlpython/exampleSession.txt sqlpython/sqlpyPlus.py |
diffstat | 3 files changed, 7 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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<username>[^/\s]*)(/(?P<password>[^/\s]*))?@((?P<host>[^/\s:]*)(:(?P<port>\d{1,4}))?/)?(?P<db_name>[^/\s:]*)(\s+as\s+(?P<mode>sys(dba|oper)))?', + connection_parser = re.compile('(?P<username>[^/\s@]*)(/(?P<password>[^/\s@]*))?(@((?P<host>[^/\s:]*)(:(?P<port>\d{1,4}))?/)?(?P<db_name>[^/\s:]*))?(\s+as\s+(?P<mode>sys(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:
--- 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)
--- 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)