]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5951 declare jdbcType on tables FILE_SOURCES, RULES and SNAPSHOT_DATA too
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 17 Dec 2014 13:40:56 +0000 (14:40 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 17 Dec 2014 13:41:09 +0000 (14:41 +0100)
sonar-core/src/main/resources/org/sonar/core/rule/RuleMapper.xml
sonar-core/src/main/resources/org/sonar/core/source/db/FileSourceMapper.xml
sonar-core/src/main/resources/org/sonar/core/source/db/SnapshotDataMapper.xml

index 282f79c10582111188a91052bf5f7dcc195d5c95..ce3320f987d7b461c88013acc07841b7a532db7f 100644 (file)
   <insert id="batchInsert" parameterType="Rule" useGeneratedKeys="false">
     insert into rules
     <include refid="insertColumns"/>
-    values (#{ruleKey}, #{repositoryKey}, #{description}, #{descriptionFormat}, #{status}, #{name}, #{configKey},
-    #{severity}, #{isTemplate}, #{language}, #{templateId},
-    #{subCharacteristicId}, #{defaultSubCharacteristicId}, #{remediationFunction}, #{defaultRemediationFunction},
-    #{remediationCoefficient}, #{defaultRemediationCoefficient}, #{remediationOffset}, #{defaultRemediationOffset},
+    values (#{ruleKey,jdbcType=VARCHAR}, #{repositoryKey,jdbcType=VARCHAR}, #{description,jdbcType=CLOB}, #{descriptionFormat,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{configKey,jdbcType=VARCHAR},
+    #{severity,jdbcType=INTEGER}, #{isTemplate,jdbcType=BOOLEAN}, #{language,jdbcType=VARCHAR}, #{templateId,jdbcType=INTEGER},
+    #{subCharacteristicId,jdbcType=INTEGER}, #{defaultSubCharacteristicId,jdbcType=INTEGER}, #{remediationFunction,jdbcType=VARCHAR}, #{defaultRemediationFunction,jdbcType=VARCHAR},
+    #{remediationCoefficient,jdbcType=VARCHAR}, #{defaultRemediationCoefficient,jdbcType=VARCHAR}, #{remediationOffset,jdbcType=VARCHAR}, #{defaultRemediationOffset,jdbcType=VARCHAR},
     #{effortToFixDescription}, #{tagsField}, #{systemTagsField}, #{noteData}, #{noteUserLogin}, #{noteCreatedAt},
-    #{noteUpdatedAt}, #{createdAt}, #{updatedAt})
+    #{noteUpdatedAt,jdbcType=TIMESTAMP}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP})
   </insert>
 
   <delete id="deleteParams" parameterType="Integer">
index 3e68f7fdb2da77cfb254edd54dcaa5c1afbbea6c..c5c6e48f470a8df2ee21f16bf27e89abb1c6f09a 100644 (file)
@@ -18,7 +18,7 @@
   
   <insert id="insert" parameterType="org.sonar.core.source.db.FileSourceDto" useGeneratedKeys="false">
     insert into file_sources (project_uuid, file_uuid, created_at, updated_at, data, line_hashes, data_hash) 
-    values (#{projectUuid}, #{fileUuid}, #{createdAt}, #{updatedAt}, #{data}, #{lineHashes}, #{dataHash})
+    values (#{projectUuid,jdbcType=VARCHAR}, #{fileUuid,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{data,jdbcType=CLOB}, #{lineHashes,jdbcType=CLOB}, #{dataHash,jdbcType=VARCHAR})
   </insert>
   
   <update id="update" parameterType="org.sonar.core.source.db.FileSourceDto" useGeneratedKeys="false">
index 16b18852be579916ae78b2eb3db2f94d9db56d55..2d380360fe81116556d30c43a2819c7e62352864 100644 (file)
@@ -30,7 +30,7 @@
     insert into snapshot_data
     (resource_id, snapshot_id, snapshot_data, data_type, created_at, updated_at)
     values (
-    #{resourceId}, #{snapshotId}, #{data}, #{dataType}, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)
+    #{resourceId,jdbcType=INTEGER}, #{snapshotId,jdbcType=INTEGER}, #{data,jdbcType=CLOB}, #{dataType,jdbcType=VARCHAR}, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)
   </insert>
 </mapper>