diff options
author | David Gageot <david@gageot.net> | 2012-07-11 08:58:12 +0200 |
---|---|---|
committer | David Gageot <david@gageot.net> | 2012-07-11 09:04:59 +0200 |
commit | 78acc6836458d679625aeb5526c85aa97d262fd7 (patch) | |
tree | 7eba9e09f92353d61016f2514ca104db5086e7cc /sonar-plugin-api | |
parent | 747425b29ed43f41c1d55a0a93610f8e19076db3 (diff) | |
download | sonarqube-78acc6836458d679625aeb5526c85aa97d262fd7.tar.gz sonarqube-78acc6836458d679625aeb5526c85aa97d262fd7.zip |
SONAR-3437 Disable batch insert because it cannot work
Diffstat (limited to 'sonar-plugin-api')
3 files changed, 2 insertions, 32 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureMapper.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureMapper.java index bc73674425b..59950963747 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureMapper.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureMapper.java @@ -22,8 +22,6 @@ package org.sonar.api.database.model; public interface MeasureMapper { void insert(MeasureModel measure); - void batchInsert(MeasureModel measure); - void insertData(MeasureModel data); void update(MeasureModel measure); 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 bac51609efe..ff9a77941aa 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 @@ -18,22 +18,7 @@ ) </insert> - <insert id="batchInsert" parameterType="MeasureModel" useGeneratedKeys="false"> - 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 ( - 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> - - <insert id="insertData" parameterType="MeasureModel" useGeneratedKeys="false"> + <insert id="insertData" parameterType="MeasureModel" useGeneratedKeys="true" keyProperty="id"> INSERT INTO measure_data (id, measure_id, snapshot_id, data) VALUES (measure_data_seq.NEXTVAL, #{id}, #{snapshotId}, #{measureData.data}) </insert> 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 e4eb62d7310..9f155fdb172 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 @@ -16,20 +16,7 @@ ) </insert> - <insert id="batchInsert" parameterType="MeasureModel" useGeneratedKeys="false"> - INSERT INTO project_measures ( - 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 ( - #{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="insertData" parameterType="MeasureModel" useGeneratedKeys="false"> + <insert id="insertData" parameterType="MeasureModel" useGeneratedKeys="true" keyProperty="id"> INSERT INTO measure_data (measure_id, snapshot_id, data) VALUES (#{id}, #{snapshotId}, #{measureData.data}) </insert> |