def update_record(self, msg_id, rec):
query = "<STR_LIT>"%self.table<EOL>sets = []<EOL>keys = sorted(rec.keys())<EOL>values = []<EOL>for key in keys:<EOL><INDENT>sets.append('<STR_LIT>'%key)<EOL>values.append(rec[key])<EOL><DEDENT>query += '<STR_LIT:U+002CU+0020>'.join(sets)<EOL>query += '<STR_LIT>'<EOL>values.append(msg_id)<EOL>self._db.execute(query, values)<EOL>
Update the data in an existing record.