comparison sqlpython.py @ 117:dfb71885dd41

everything seems working
author catherine@Elli.myhome.westell.com
date Fri, 04 Jul 2008 18:54:26 -0400
parents 38ee1ca92801
children e11bbeb3f34c
comparison
equal deleted inserted replaced
116:6e346ae994b9 117:dfb71885dd41
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 statement = self.parsed(arg)
128 self.query = statement.unterminated
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: