Exemplo n.º 1
0
 def show_devices(self):
     res=self._cur.execute("select * from devices_table;")
     namelist=[]
     for line in res:
         #print line
         rowValue = SqlRowProxy(self, 'id', line, self._columns)
         namelist.append({'device':rowValue.getjsonvalue()})
     return namelist
Exemplo n.º 2
0
 def show_devices(self):
     res = self._cur.execute("select * from devices_table;")
     namelist = []
     for line in res:
         #print line
         rowValue = SqlRowProxy(self, 'id', line, self._columns)
         namelist.append({'device': rowValue.getjsonvalue()})
     return namelist
Exemplo n.º 3
0
 def show_user(self):
     try:
         rows=self._cur.execute("select * from users_table;")
         rowsvalue = []
         if (rows != None):
             for row in rows:
                 row_value = SqlRowProxy(self, 'username', row)
                 rowsvalue.append(row_value.getjsonvalue())
         return rowsvalue
     except Exception as e:
         return None, str(e)  
Exemplo n.º 4
0
 def show_user(self):
     try:
         rows = self._cur.execute("select * from users_table;")
         rowsvalue = []
         if (rows != None):
             for row in rows:
                 row_value = SqlRowProxy(self, 'username', row)
                 rowsvalue.append(row_value.getjsonvalue())
         return rowsvalue
     except Exception as e:
         return None, str(e)