Ejemplo n.º 1
0
 def showTable(self, options):
     table = options['table']
     db = options['db']
     display_query = "SELECT * from " + table
     rows = query.query(display_query, db, self.screen, None, None, self.username, self.password)
     tableDisplay.navigate(rows,0,0,self.screen)
     self.screen.clear()
Ejemplo n.º 2
0
 def showTable(self, options):
     table = options['table']
     db = options['db']
     display_query = "SELECT * from " + table
     rows = query.query(display_query, db, self.screen, None, None,
                        self.username, self.password)
     tableDisplay.navigate(rows, 0, 0, self.screen)
     self.screen.clear()
Ejemplo n.º 3
0
 def run(self, string, currentDB):
     result = query.query(string, currentDB, self.screen)
     if result == -1:
         error.throw(self.screen, "The query did not succeed.")
         self.screen.clear()
     elif result == 0:
         error.throw(self.screen, "The query was succesful.")
         self.screen.clear()
         q = "INSERT INTO queries_history (query) VALUES (%s)"
         query.query(q, 'queries', None, None, string)
     else:
         self.screen.clear()
         tableDisplay.navigate(result, 0, 0, self.screen)
         self.screen.clear()
         q = "INSERT INTO queries_history (query) VALUES (%s)"
         query.query(q, 'queries', None, None, string)
Ejemplo n.º 4
0
 def run(self, string, currentDB):
     result = query.query(string, currentDB, self.screen)
     if result == -1:
         error.throw(self.screen, "The query did not succeed.")
         self.screen.clear()
     elif result == 0:
         error.throw(self.screen, "The query was succesful.")
         self.screen.clear()
         q = "INSERT INTO queries_history (query) VALUES (%s)"
         query.query(q, 'queries', None, None, string)
     else:
         self.screen.clear()
         tableDisplay.navigate(result, 0, 0, self.screen)
         self.screen.clear()
         q = "INSERT INTO queries_history (query) VALUES (%s)"
         query.query(q, 'queries', None, None, string)