예제 #1
0
 def __noIntent_update__(self, _id, Q):
     conn, cursor = DB().DBconnect()
     command = """
                       EXEC CBT_NoIntent_UPD @ID=?, @Question=?
                       """
     arg = (_id, Q)
     try:
         cursor.execute(command, arg)
         print("Updated Successfully")
         conn.commit()
     except Exception as e:
         print("Error ", e)
     DB().DBdisconnect()
예제 #2
0
 def __noIntent_delete__(self, _id):
     conn, cursor = DB().DBconnect()
     command = """
                          EXEC CBT_NoIntent_DEL @ID=?
                          """
     arg = _id
     try:
         cursor.execute(command, arg)
         print("Deleted Successfully")
         conn.commit()
     except Exception as e:
         print("Error ", e)
     DB().DBdisconnect()
예제 #3
0
 def __lowProb_insert__(self, Q, IntentID):
     conn, cursor = DB().DBconnect()
     command = """
               EXEC CBT_LowProb_INS @Question=?, @IntentID=?
               """
     arg = (Q, IntentID)
     try:
         cursor.execute(command, arg)
         print("Inserted Successfully")
         conn.commit()
     except Exception as e:
         print("Error ", e)
     DB().DBdisconnect()
예제 #4
0
 def __noIntent_insert__(self, Q):
     conn, cursor = DB().DBconnect()
     command = """
               EXEC CBT_NoIntent_INS @Question=?
               """
     arg = Q
     try:
         cursor.execute(command, arg)
         print("Inserted Successfully")
         conn.commit()
     except Exception as e:
         print("Error ", e)
     DB().DBdisconnect()
예제 #5
0
 def __feedback_update__(self, _id, Log_ID, Rate, Message):
     conn, cursor = DB().DBconnect()
     command = """
            EXEC CBT_Feedback_UPD @id=?, @logid=? , @rate=? , @text=?
            """
     arg = (_id, Log_ID, Rate, Message)
     try:
         cursor.execute(command, arg)
         print("updated Successfully")
         conn.commit()
     except Exception as e:
         print("Error ", e)
     DB().DBdisconnect()
예제 #6
0
 def SaveIntent(self, name):
     conn, cursor = DB().DBconnect()
     command = """
     EXEC CBT_LKP_Intent_INS @Name=?
     """
     arg = name
     try:
         cursor.execute(command, arg)
         print("Inserted Successfully")
         conn.commit()
     except Exception as e:
         print("Error ", e)
     DB().DBdisconnect()
예제 #7
0
 def SaveIntentSlot(self, intentID, slotID):
     conn, cursor = DB().DBconnect()
     command = """
     EXEC CBT_LNK_IntentSlot_INS @IntentID=? , @SlotID=?
     """
     arg = (intentID, slotID)
     try:
         cursor.execute(command, arg)
         print("Inserted Successfully")
         conn.commit()
     except Exception as e:
         print("Error ", e)
     DB().DBdisconnect()
예제 #8
0
    def UpdateIntent(self, id, name):
        conn, cursor = DB().DBconnect()
        command = """
        EXEC CBT_LKP_Intent_UPD @ID=? ,@Name=? 
        """
        arg = (id, name)
        try:
            cursor.execute(command, arg)
            print("Updated Successfully")
            conn.commit()

        except Exception as e:
            print("Error ", e)
        DB().DBdisconnect()
예제 #9
0
    def DeleteIntentSlot(self, id):
        conn, cursor = DB().DBconnect()
        command = """
        EXEC CBT_LNK_IntentSlot_DEL @ID=?
        """
        arg = id
        try:
            cursor.execute(command, arg)
            print("Deleted Successfully")
            conn.commit()

        except Exception as e:
            print("Error ", e)
        DB().DBdisconnect()