def update(cursor, table, where_kv, commit=True, **field_values):
q = """<STR_LIT>""" % table<EOL>fields = field_values.keys()<EOL>kv = '<STR_LIT:U+002C>'.join(['<STR_LIT>'.format(f) for f in fields])<EOL>where = '<STR_LIT>'.join(['<STR_LIT>'.format(f) for f in where_kv.keys()])<EOL>q = q.format(kv, where)<EOL>args = field_values.values() + where_kv.values()<EOL>cursor.execute(q, args=args)<EOL>if commit:<EOL><INDENT>cursor.connection.commit()<EOL><DEDENT>
db update 쿼리 빌딩 및 실행, 단, commit은
:param cursor: 커서
:type cursor: Cursor
:param table: 테이블 이름
:type table: str
:param where_kv: 업데이트 where 조건 dictionary, key:field, value:equal condition only
:type where_kv: dict
:param field_values: kwarg 업데이트용
:type field_values: dict
:param commit: 커밋 여부
:type commit: bool
:return: