diff sqlpython.py @ 115:43f5dc75b791

migrating to onecmd from select
author catherine@Elli.myhome.westell.com
date Sat, 28 Jun 2008 11:10:09 -0400
parents c1c05670b4e5
children
line wrap: on
line diff
--- a/sqlpython.py	Fri Jun 27 16:09:30 2008 -0400
+++ b/sqlpython.py	Sat Jun 28 11:10:09 2008 -0400
@@ -107,9 +107,7 @@
 \\t   transposed
 \\x   XML"""
         print self.do_terminators.__doc__
-    
-    terminatorSearchString = '|'.join('\\' + d.split()[0] for d in do_terminators.__doc__.splitlines())
-        
+            
     def do_yasql(self, arg):
         '''Sends a command to a YASQL session (http://sourceforge.net/projects/yasql/)'''
         self.designated_session(arg, pexpecter.YASQLSession)
@@ -136,17 +134,9 @@
             result = self.fail(arg)
             if not result:
                 print str(e)
-            
-    def do_commit(self, arg):
-        self.default('commit %s;' % (arg), do_everywhere=True)
-    def do_rollback(self, arg):
-        self.default('rollback %s;' % (arg), do_everywhere=True)        
-        
+                    
     # shortcuts
     do_exit = cmd2.Cmd.do_quit
-
-    stmtEndSearchString = r'(.*)(%s)\s*(\d+)?\s*$' % terminatorSearchString
-    statementEndPattern = re.compile(stmtEndSearchString, re.MULTILINE | re.DOTALL)
     
 def pmatrix(rows,desc,maxlen=30):
     '''prints a matrix, used by sqlpython to print queries' result sets'''