Mercurial > sqlpython
changeset 144:5a021524805a
fixed do_resolve
author | catherine@Elli.myhome.westell.com |
---|---|
date | Tue, 23 Sep 2008 07:29:30 -0400 |
parents | 24b5daa7ebe1 |
children | 7e5105efa15d |
files | sqlpyPlus.py |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/sqlpyPlus.py Thu Sep 04 11:35:52 2008 -0400 +++ b/sqlpyPlus.py Tue Sep 23 07:29:30 2008 -0400 @@ -1,4 +1,4 @@ -"""sqlpyPlus - extra features (inspired by Oracle SQL*Plus) for Luca Canali's sqlpython.py +"""sqlpyPlus - extra features (inspired by Oracle SQL*Plus) for Luca Canali's sqlpython.py Features include: - SQL*Plus-style bind variables @@ -559,7 +559,8 @@ ^ pyparsing.Literal('\n/') ^ \ (pyparsing.Literal('\nEOF') + pyparsing.stringEnd)) \ ('terminator') + \ - pyparsing.Optional(rowlimitPattern) + pyparsing.Optional(rowlimitPattern) + \ + pyparsing.FollowedBy(pyparsing.LineEnd()) def do_select(self, arg, bindVarsIn=None, override_terminator=None): """Fetch rows from a table. @@ -607,8 +608,8 @@ def do_pull(self, arg, opts): """Displays source code.""" - arg = self.parsed(arg).unterminated - object_type, owner, object_name = self.resolve(arg.upper()) + arg = self.parsed(arg).unterminated.upper() + object_type, owner, object_name = self.resolve(arg) if not object_type: return self.stdout.write("%s %s.%s\n" % (object_type, owner, object_name)) @@ -728,7 +729,8 @@ #todo: resolve not finding cwm$ table def do_resolve(self, arg): - self.stdout.write(self.resolve(arg)+'\n') + arg = self.parsed(arg).unterminated.upper() + self.stdout.write(','.join(self.resolve(arg))+'\n') def spoolstop(self): if self.spoolFile: