changeset 179:7e3921829399

about to remove failover
author catherine@Elli.myhome.westell.com
date Wed, 05 Nov 2008 07:41:42 -0500
parents 3ce72ea76768
children 9e6c1ec07ebc
files sqlpython/sqlpyPlus.py sqlpython/sqlpython.py
diffstat 2 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/sqlpython/sqlpyPlus.py	Tue Oct 28 16:44:51 2008 -0400
+++ b/sqlpython/sqlpyPlus.py	Wed Nov 05 07:41:42 2008 -0500
@@ -352,9 +352,13 @@
        
 class sqlpyPlus(sqlpython.sqlpython):
     defaultExtension = 'sql'
-    sqlpython.sqlpython.shortcuts.update({':': 'setbind', '\\': 'psql', '@': '_load'})
+    sqlpython.sqlpython.shortcuts.update({':': 'setbind', 
+                                          '\\': 'psql', 
+                                          '@': '_load',
+                                          '--': '_comment',
+                                          '/*': '_multiline_comment'})
     multilineCommands = '''select insert update delete tselect
-                      create drop alter'''.split()
+                      create drop alter _multiline_comment'''.split()
     defaultFileName = 'afiedt.buf'
     def __init__(self):
         sqlpython.sqlpython.__init__(self)
@@ -386,6 +390,11 @@
         return cmd, arg, line
     
     do__load = Cmd.do_load
+    
+    def do__comment(self, arg):
+        pass
+    def do__multiline_comment(self, arg):
+        pass
 
     def onecmd_plus_hooks(self, line):                          
         line = self.precmd(line)
--- a/sqlpython/sqlpython.py	Tue Oct 28 16:44:51 2008 -0400
+++ b/sqlpython/sqlpython.py	Wed Nov 05 07:41:42 2008 -0500
@@ -149,7 +149,7 @@
     def do_quit(self, arg):
         if self.commit_on_exit and hasattr(self, 'curs'):
             self.default('commit;')
-        cmd2.Cmd.do_quit()
+        return cmd2.Cmd.do_quit(self, None)
     do_exit = do_quit
     do_q = do_quit