p.uuid as uuid,
p.project_uuid as projectUuid,
p.alm_setting_uuid as almSettingUuid,
p.alm_repo as almRepo,
p.alm_slug as almSlug,
p.summary_comment_enabled as summaryCommentEnabled,
p.created_at as createdAt,
p.updated_at as updatedAt
INSERT INTO project_alm_settings
(
uuid,
project_uuid,
alm_setting_uuid,
alm_repo,
alm_slug,
summary_comment_enabled,
created_at,
updated_at
)
VALUES (
#{uuid, jdbcType=VARCHAR},
#{dto.projectUuid, jdbcType=VARCHAR},
#{dto.almSettingUuid, jdbcType=VARCHAR},
#{dto.almRepo, jdbcType=VARCHAR},
#{dto.almSlug, jdbcType=VARCHAR},
#{dto.summaryCommentEnabled, jdbcType=BOOLEAN},
#{now, jdbcType=BIGINT},
#{now, jdbcType=BIGINT}
)
INSERT INTO project_alm_settings
(
uuid,
project_uuid,
alm_setting_uuid,
alm_repo,
alm_slug,
summary_comment_enabled,
created_at,
updated_at
)
VALUES (
#{uuid, jdbcType=VARCHAR},
#{dto.projectUuid, jdbcType=VARCHAR},
#{dto.almSettingUuid, jdbcType=VARCHAR},
#{dto.almRepo, jdbcType=VARCHAR},
#{dto.almSlug, jdbcType=VARCHAR},
#{dto.summaryCommentEnabled, jdbcType=NUMERIC},
#{now, jdbcType=BIGINT},
#{now, jdbcType=BIGINT}
)
UPDATE project_alm_settings
SET
alm_setting_uuid = #{dto.almSettingUuid, jdbcType=VARCHAR},
alm_repo = #{dto.almRepo, jdbcType=VARCHAR},
alm_slug = #{dto.almSlug, jdbcType=VARCHAR},
summary_comment_enabled = #{dto.summaryCommentEnabled, jdbcType=BOOLEAN},
updated_at = #{now, jdbcType=BIGINT}
WHERE
project_uuid = #{dto.projectUuid, jdbcType=VARCHAR}
UPDATE project_alm_settings
SET
alm_setting_uuid = #{dto.almSettingUuid, jdbcType=VARCHAR},
alm_repo = #{dto.almRepo, jdbcType=VARCHAR},
alm_slug = #{dto.almSlug, jdbcType=VARCHAR},
summary_comment_enabled = #{dto.summaryCommentEnabled, jdbcType=NUMERIC},
updated_at = #{now, jdbcType=BIGINT}
WHERE
project_uuid = #{dto.projectUuid, jdbcType=VARCHAR}
DELETE FROM project_alm_settings WHERE alm_setting_uuid = #{almSettingUuid, jdbcType=VARCHAR}
DELETE FROM project_alm_settings WHERE project_uuid = #{projectUuid, jdbcType=VARCHAR}