Mercurial > sqlpython
comparison sqlpython.py @ 114:c1c05670b4e5
going to modify to work with new cmd2
author | catherine@Elli.myhome.westell.com |
---|---|
date | Fri, 27 Jun 2008 16:09:30 -0400 |
parents | 38ee1ca92801 |
children | 43f5dc75b791 |
comparison
equal
deleted
inserted
replaced
113:d48034a42b26 | 114:c1c05670b4e5 |
---|---|
122 '''Sends a command to a Senora session (http://senora.sourceforge.net/)''' | 122 '''Sends a command to a Senora session (http://senora.sourceforge.net/)''' |
123 self.designated_session(arg, pexpecter.SenoraSession) | 123 self.designated_session(arg, pexpecter.SenoraSession) |
124 do_sen = do_senora | 124 do_sen = do_senora |
125 | 125 |
126 def default(self, arg, do_everywhere = False): | 126 def default(self, arg, do_everywhere = False): |
127 self.query = self.finishStatement(arg).strip().rstrip(';') | 127 #self.query = self.finishStatement(arg).strip().rstrip(';') |
128 self.query = arg | |
128 try: | 129 try: |
129 self.varsUsed = sqlpyPlus.findBinds(self.query, self.binds, givenBindVars={}) | 130 self.varsUsed = sqlpyPlus.findBinds(self.query, self.binds, givenBindVars={}) |
130 self.curs.execute(self.query, self.varsUsed) | 131 self.curs.execute(self.query, self.varsUsed) |
131 print '\nExecuted%s\n' % ((self.curs.rowcount > 0) and ' (%d rows)' % self.curs.rowcount or '') | 132 print '\nExecuted%s\n' % ((self.curs.rowcount > 0) and ' (%d rows)' % self.curs.rowcount or '') |
132 if do_everywhere: | 133 if do_everywhere: |