aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-db/src/main/resources/org/sonar/db
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2017-02-06 14:47:25 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2017-02-09 12:15:10 +0100
commit249770f0db06b31d1da4bc1f0f418aebffeb7c82 (patch)
treeaafe9f5ec3d7351056c9f400ffd25dbe9b526f42 /sonar-db/src/main/resources/org/sonar/db
parentd0e2843455903704e470a5fb4834cded31d10dcb (diff)
downloadsonarqube-249770f0db06b31d1da4bc1f0f418aebffeb7c82.tar.gz
sonarqube-249770f0db06b31d1da4bc1f0f418aebffeb7c82.zip
SONAR-8744 Remove usage of periods 2 to 5 in Daos
Diffstat (limited to 'sonar-db/src/main/resources/org/sonar/db')
-rw-r--r--sonar-db/src/main/resources/org/sonar/db/component/SnapshotMapper.xml57
-rw-r--r--sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml16
2 files changed, 9 insertions, 64 deletions
diff --git a/sonar-db/src/main/resources/org/sonar/db/component/SnapshotMapper.xml b/sonar-db/src/main/resources/org/sonar/db/component/SnapshotMapper.xml
index 79051c4042e..4e00d6ac39c 100644
--- a/sonar-db/src/main/resources/org/sonar/db/component/SnapshotMapper.xml
+++ b/sonar-db/src/main/resources/org/sonar/db/component/SnapshotMapper.xml
@@ -12,21 +12,9 @@
s.purge_status as purgeStatus,
s.islast as last,
s.version as version,
- s.period1_mode as period1Mode,
- s.period2_mode as period2Mode,
- s.period3_mode as period3Mode,
- s.period4_mode as period4Mode,
- s.period5_mode as period5Mode,
- s.period1_param as period1Param,
- s.period2_param as period2Param,
- s.period3_param as period3Param,
- s.period4_param as period4Param,
- s.period5_param as period5Param,
- s.period1_date as period1Date,
- s.period2_date as period2Date,
- s.period3_date as period3Date,
- s.period4_date as period4Date,
- s.period5_date as period5Date
+ s.period1_mode as periodMode,
+ s.period1_param as periodParam,
+ s.period1_date as periodDate
</sql>
<sql id="viewsSnapshotColumns">
@@ -34,13 +22,6 @@
s.created_at as createdAt
</sql>
- <select id="selectByKey" parameterType="Long" resultType="Snapshot">
- SELECT
- <include refid="snapshotColumns" />
- FROM snapshots s
- where s.id=#{key,jdbcType=BIGINT}
- </select>
-
<select id="selectByUuids" parameterType="List" resultType="Snapshot">
SELECT
<include refid="snapshotColumns"/>
@@ -181,20 +162,8 @@
islast,
version,
period1_mode,
- period2_mode,
- period3_mode,
- period4_mode,
- period5_mode,
period1_param,
- period2_param,
- period3_param,
- period4_param,
- period5_param,
- period1_date,
- period2_date,
- period3_date,
- period4_date,
- period5_date)
+ period1_date)
values (
#{uuid, jdbcType=VARCHAR},
#{componentUuid, jdbcType=VARCHAR},
@@ -204,21 +173,9 @@
#{purgeStatus, jdbcType=INTEGER},
#{last, jdbcType=BOOLEAN},
#{version, jdbcType=VARCHAR},
- #{period1Mode, jdbcType=VARCHAR},
- #{period2Mode, jdbcType=VARCHAR},
- #{period3Mode, jdbcType=VARCHAR},
- #{period4Mode, jdbcType=VARCHAR},
- #{period5Mode, jdbcType=VARCHAR},
- #{period1Param, jdbcType=VARCHAR},
- #{period2Param, jdbcType=VARCHAR},
- #{period3Param, jdbcType=VARCHAR},
- #{period4Param, jdbcType=VARCHAR},
- #{period5Param, jdbcType=VARCHAR},
- #{period1Date, jdbcType=BIGINT},
- #{period2Date, jdbcType=BIGINT},
- #{period3Date, jdbcType=BIGINT},
- #{period4Date, jdbcType=BIGINT},
- #{period5Date, jdbcType=BIGINT})
+ #{periodMode, jdbcType=VARCHAR},
+ #{periodParam, jdbcType=VARCHAR},
+ #{periodDate, jdbcType=BIGINT})
</insert>
</mapper>
diff --git a/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml b/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml
index 2a75e4a422c..24028b375d5 100644
--- a/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml
+++ b/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml
@@ -13,11 +13,7 @@
pm.alert_status as alertStatus,
pm.alert_text as alertText,
pm.measure_data as dataValue,
- pm.variation_value_1 as variation1,
- pm.variation_value_2 as variation2,
- pm.variation_value_3 as variation3,
- pm.variation_value_4 as variation4,
- pm.variation_value_5 as variation5
+ pm.variation_value_1 as variation
</sql>
<sql id="extendedMeasureColumns">
@@ -186,10 +182,6 @@
description,
person_id,
variation_value_1,
- variation_value_2,
- variation_value_3,
- variation_value_4,
- variation_value_5,
measure_data)
VALUES (
#{value, jdbcType=DOUBLE},
@@ -201,11 +193,7 @@
#{alertText, jdbcType=VARCHAR},
#{description, jdbcType=VARCHAR},
#{developerId, jdbcType=INTEGER},
- #{variation1, jdbcType=DOUBLE},
- #{variation2, jdbcType=DOUBLE},
- #{variation3, jdbcType=DOUBLE},
- #{variation4, jdbcType=DOUBLE},
- #{variation5, jdbcType=DOUBLE},
+ #{variation, jdbcType=DOUBLE},
#{dataValue, jdbcType=BINARY}
)
</insert>