e.uuid,
e.analysis_uuid as "analysisUuid",
e.component_uuid as "componentUuid",
e.name,
e.category,
e.description,
e.event_data as "data",
e.event_date as "date",
e.created_at as "createdAt"
INSERT INTO events (uuid, analysis_uuid, component_uuid, name, category, description, event_data, event_date, created_at)
VALUES (
#{uuid, jdbcType=VARCHAR},
#{analysisUuid, jdbcType=VARCHAR},
#{componentUuid, jdbcType=VARCHAR},
#{name, jdbcType=VARCHAR},
#{category, jdbcType=VARCHAR},
#{description, jdbcType=VARCHAR},
#{data, jdbcType=VARCHAR},
#{date, jdbcType=BIGINT},
#{createdAt, jdbcType=BIGINT})
update events
set name = #{name, jdbcType=VARCHAR},
description = #{description, jdbcType=VARCHAR}
where uuid = #{uuid}
DELETE FROM events WHERE uuid=#{uuid}