コード例 #1
0
 def deleteData(self,req,tblName):
   #generic db delete function
   try:
     res = deleteDataSrvResponse()
     db_username,db_password=self.getLogin()
     con = mdb.connect('localhost', db_username, db_password, 'RappStore');
     cur = con.cursor()
     where=self.constructAndQuery(req.where_data)
     query="Delete from "+tblName+where
     cur.execute("LOCK TABLES "+tblName+" WRITE")
     cur.execute(query)
     cur.execute("UNLOCK TABLES")
     res.success.data=True
     res.trace.append("Success")
   except mdb.Error, e:
     res.trace.append(("Database Error %d: %s" % (e.args[0],e.args[1])))
     res.success.data=False
     print "Error %d: %s" % (e.args[0],e.args[1])
コード例 #2
0
 def tblAppsRobotsDeleteDataHandler(self, req):
     res = deleteDataSrvResponse()
     res = self.deleteData(req, "tblAppsRobots")
     return res
コード例 #3
0
 def tblRappDeleteDataHandler(self, req):
     res = deleteDataSrvResponse()
     res = self.deleteData(req, "tblRapp")
     return res
コード例 #4
0
 def tblAppsRobotsDeleteDataHandler(self,req):
   res = deleteDataSrvResponse()
   res=self.deleteData(req,"tblAppsRobots")
   return res
コード例 #5
0
 def tblRappDeleteDataHandler(self,req):
   res = deleteDataSrvResponse()
   res=self.deleteData(req,"tblRapp")
   return res
コード例 #6
0
 def tblCloudAgentServiceArgumentsDeleteDataHandler(self,req):
   res = deleteDataSrvResponse()
   res=self.deleteData(req,"cloud_agent_service_arguments")
   return res
コード例 #7
0
 def tblCloudAgentDeleteDataHandler(self,req):
   res = deleteDataSrvResponse()
   res=self.deleteData(req,"cloud_agent")
   return res
コード例 #8
0
 def tblUserDeleteDataHandler(self,req):
   res = deleteDataSrvResponse()
   res=self.deleteData(req,"users")
   return res