diff sqlpyPlus.py @ 150:b00a020b81c6

ready ? with 1.4.9
author catherine@dellzilla
date Fri, 26 Sep 2008 13:03:10 -0400
parents 3b1e25cc0e38
children 802d8df993da
line wrap: on
line diff
--- a/sqlpyPlus.py	Fri Sep 26 10:33:37 2008 -0400
+++ b/sqlpyPlus.py	Fri Sep 26 13:03:10 2008 -0400
@@ -838,7 +838,7 @@
             try:
                 self.binds[var] = float(val)
                 return
-            except ValueError:
+            except ValueError: 
                 statekeeper = Statekeeper(self, ('autobind',))  
                 self.autobind = True
                 self.do_select('%s AS %s FROM dual;' % (val, var))
@@ -914,9 +914,13 @@
 
     def do_cat(self, arg):
         '''cat TABLENAME --> SELECT * FROM equivalent'''
-        targets = arg.strip().split()
+        if not arg:
+            print self.do_cat.__doc__
+            return
+        arg = self.parsed(arg)
+        targets = arg.unterminated.split()
         for target in targets:
-            self.do_select('* from %s' % target)
+            self.do_select('* from %s%s%s' % (target, arg.terminator, arg.rowlimit)) # permissive of space before terminator
 
     @options([make_option('-i', '--ignore-case', dest='ignorecase', action='store_true', help='Case-insensitive search')])        
     def do_grep(self, arg, opts):