Mercurial > sqlpython
changeset 311:38ac0fbb2b63
history on plsql
author | catherine@Elli.myhome.westell.com |
---|---|
date | Thu, 26 Mar 2009 23:13:27 -0400 |
parents | c897add05eb1 |
children | c6abd01fe3e1 |
files | sqlpython/sqlpyPlus.py |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/sqlpython/sqlpyPlus.py Thu Mar 26 10:21:31 2009 -0400 +++ b/sqlpython/sqlpyPlus.py Thu Mar 26 23:13:27 2009 -0400 @@ -32,6 +32,9 @@ except (RuntimeError, ImportError): pass +#TODO: keep DECLARE blocks in history; Oracle error location; YASQL-like SHOW x ON y; +# round-trip PL/SQL packages; print/stdout inconsistency; \dt (show triggers); +# spell check descQueries = { 'TABLE': { True: # long description @@ -1354,6 +1357,7 @@ lines = [line1] while True: line = self.pseudo_raw_input(self.continuation_prompt) + self.history[-1] = '%s\n%s' % (self.history[-1], line) if line == 'EOF': return if line.strip() == '/': @@ -1437,14 +1441,14 @@ if '*' in target: self._execute("""SELECT owner, object_name FROM all_objects WHERE object_type IN ('TABLE','VIEW') - AND object_name LIKE '%s'%s""" % - (target.upper().replace('*','%'), arg.parsed.terminator)) + AND object_name LIKE '%s'""" % + target.upper().replace('*','%')) for row in self.curs: targets.append('%s.%s' % row) else: targets.append(target) for target in targets: - print target + self.stdout.write('%s\n' % target) target = target.rstrip(';') try: self._execute('select * from %s where 1=0' % target) # just to fill description