I have following PostgreSQL query
cond = {'notified':'100','token':'123','usage':'kart_user'}
sql = "UPDATE {} set notified = %(notified)s where token = %(token)s".format(cond['usage'])
result = self.cur.execute(sql,cond)
result = self.dbconn.commit()
return res
Now, the problem I facing in the case of dynamic dictionary.
dictionary keys and value is not fixed.
Eg-
cond = {'notified':'100','token':'123','custid':'1v123','buyer':'yes','usage':'kart_user'}
How i can rewrite above update query in the case of dynamic keys?
Thank you for your response.