summaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper-oracle.xml40
-rw-r--r--sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper.xml22
2 files changed, 30 insertions, 32 deletions
diff --git a/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper-oracle.xml b/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper-oracle.xml
index 2e4c7fd0d2f..bac51609efe 100644
--- a/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper-oracle.xml
+++ b/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper-oracle.xml
@@ -4,33 +4,31 @@
<mapper namespace="org.sonar.api.database.model.MeasureMapper">
<insert id="insert" parameterType="MeasureModel" keyColumn="id" useGeneratedKeys="true" keyProperty="id">
- <selectKey order="BEFORE" resultType="Long" keyProperty="id">
- select project_measures_seq.NEXTVAL from DUAL
- </selectKey>
- INSERT INTO project_measures (id,
+ INSERT INTO project_measures (
+ id,
value, metric_id, snapshot_id, rule_id, text_value, tendency, measure_date,
project_id, alert_status, alert_text, url, description, rule_priority, characteristic_id, variation_value_1,
variation_value_2, variation_value_3, variation_value_4, variation_value_5, person_id)
- VALUES (#{id},
- #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue, jdbcType=VARCHAR}, #{tendency},
- #{measureDate, jdbcType=TIMESTAMP}, #{projectId}, #{alertStatus, jdbcType=VARCHAR}, #{alertText, jdbcType=VARCHAR},
- #{url, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1},
+ VALUES (
+ project_measures_seq.NEXTVAL,
+ #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue}, #{tendency},
+ #{measureDate}, #{projectId}, #{alertStatus}, #{alertText},
+ #{url}, #{description}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1},
#{variationValue2}, #{variationValue3}, #{variationValue4}, #{variationValue5}, #{personId}
)
</insert>
<insert id="batchInsert" parameterType="MeasureModel" useGeneratedKeys="false">
- <selectKey order="BEFORE" resultType="Long" keyProperty="id">
- select project_measures_seq.NEXTVAL from DUAL
- </selectKey>
- INSERT INTO project_measures (id,
+ INSERT INTO project_measures (
+ id,
value, metric_id, snapshot_id, rule_id, text_value, tendency, measure_date,
project_id, alert_status, alert_text, url, description, rule_priority, characteristic_id, variation_value_1,
variation_value_2, variation_value_3, variation_value_4, variation_value_5, person_id)
- VALUES (#{id},
- #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue, jdbcType=VARCHAR}, #{tendency},
- #{measureDate, jdbcType=TIMESTAMP}, #{projectId}, #{alertStatus, jdbcType=VARCHAR}, #{alertText, jdbcType=VARCHAR},
- #{url, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1},
+ VALUES (
+ project_measures_seq.NEXTVAL,
+ #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue}, #{tendency},
+ #{measureDate, jdbcType=TIMESTAMP}, #{projectId}, #{alertStatus}, #{alertText},
+ #{url}, #{description}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1},
#{variationValue2}, #{variationValue3}, #{variationValue4}, #{variationValue5}, #{personId}
)
</insert>
@@ -46,12 +44,12 @@
value = #{value},
metric_id = #{metricId},
rule_id = #{ruleId},
- text_value = #{textValue, jdbcType=VARCHAR},
+ text_value = #{textValue},
tendency = #{tendency},
- alert_status = #{alertStatus, jdbcType=VARCHAR},
- alert_text = #{alertText, jdbcType=VARCHAR},
- url = #{url, jdbcType=VARCHAR},
- description = #{description, jdbcType=VARCHAR},
+ alert_status = #{alertStatus},
+ alert_text = #{alertText},
+ url = #{url},
+ description = #{description},
rule_priority = #{rulePriority.ordinal},
characteristic_id = #{characteristic.id},
variation_value_1 = #{variationValue1},
diff --git a/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper.xml b/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper.xml
index c89f8eed8d1..e4eb62d7310 100644
--- a/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper.xml
+++ b/sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper.xml
@@ -9,9 +9,9 @@
project_id, alert_status, alert_text, url, description, rule_priority, characteristic_id, variation_value_1,
variation_value_2, variation_value_3, variation_value_4, variation_value_5, person_id)
VALUES (
- #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue, jdbcType=VARCHAR}, #{tendency},
- #{measureDate, jdbcType=TIMESTAMP}, #{projectId}, #{alertStatus, jdbcType=VARCHAR}, #{alertText, jdbcType=VARCHAR},
- #{url, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1},
+ #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue}, #{tendency},
+ #{measureDate}, #{projectId}, #{alertStatus}, #{alertText},
+ #{url}, #{description}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1},
#{variationValue2}, #{variationValue3}, #{variationValue4}, #{variationValue5}, #{personId}
)
</insert>
@@ -22,9 +22,9 @@
project_id, alert_status, alert_text, url, description, rule_priority, characteristic_id, variation_value_1,
variation_value_2, variation_value_3, variation_value_4, variation_value_5, person_id)
VALUES (
- #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue, jdbcType=VARCHAR}, #{tendency},
- #{measureDate, jdbcType=TIMESTAMP}, #{projectId}, #{alertStatus, jdbcType=VARCHAR}, #{alertText, jdbcType=VARCHAR},
- #{url, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1},
+ #{value}, #{metricId}, #{snapshotId}, #{ruleId}, #{textValue}, #{tendency},
+ #{measureDate}, #{projectId}, #{alertStatus}, #{alertText},
+ #{url}, #{description}, #{rulePriority.ordinal}, #{characteristic.id}, #{variationValue1},
#{variationValue2}, #{variationValue3}, #{variationValue4}, #{variationValue5}, #{personId}
)
</insert>
@@ -40,12 +40,12 @@
value = #{value},
metric_id = #{metricId},
rule_id = #{ruleId},
- text_value = #{textValue, jdbcType=VARCHAR},
+ text_value = #{textValue},
tendency = #{tendency},
- alert_status = #{alertStatus, jdbcType=VARCHAR},
- alert_text = #{alertText, jdbcType=VARCHAR},
- url = #{url, jdbcType=VARCHAR},
- description = #{description, jdbcType=VARCHAR},
+ alert_status = #{alertStatus},
+ alert_text = #{alertText},
+ url = #{url},
+ description = #{description},
rule_priority = #{rulePriority.ordinal},
characteristic_id = #{characteristic.id},
variation_value_1 = #{variationValue1},