id, user_id, question_id, selected_options, text_answer, created_at INSERT INTO survey_responses (user_id, question_id, selected_options, text_answer) VALUES (#{userId}, #{questionId}, #{selectedOptions,typeHandler=org.apache.ibatis.type.JsonTypeHandler}, #{textAnswer}) INSERT INTO survey_responses (user_id, question_id, selected_options, text_answer) VALUES (#{item.userId}, #{item.questionId}, #{item.selectedOptions,typeHandler=org.apache.ibatis.type.JsonTypeHandler}, #{item.textAnswer}) UPDATE survey_responses SET user_id = #{userId}, question_id = #{questionId}, selected_options = #{selectedOptions,typeHandler=org.apache.ibatis.type.JsonTypeHandler}, text_answer = #{textAnswer} WHERE id = #{id} DELETE FROM survey_responses WHERE id = #{id} DELETE FROM survey_responses WHERE user_id = #{userId}