]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10430 add missing jdbc types
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Mon, 28 May 2018 09:37:25 +0000 (11:37 +0200)
committerSonarTech <sonartech@sonarsource.com>
Mon, 28 May 2018 18:20:45 +0000 (20:20 +0200)
server/sonar-db-dao/src/main/resources/org/sonar/db/source/FileSourceMapper.xml

index 64f804a97c6fa9340f23c866734c2af05c0d7300..1fdac6a2b7f46c85fa0f07aa5a68b76bd03ee251 100644 (file)
@@ -23,8 +23,8 @@
     from
       file_sources
     where
-      file_uuid = #{fileUuid}
-      and data_type = #{dataType}
+      file_uuid = #{fileUuid,jdbcType=VARCHAR}
+      and data_type = #{dataType,jdbcType=VARCHAR}
   </select>
 
   <select id="selectHashesForProject" parameterType="map" resultType="org.sonar.db.source.FileSourceDto">
@@ -38,8 +38,8 @@
     from
       file_sources
     where
-      project_uuid = #{projectUuid}
-      and data_type=#{dataType}
+      project_uuid = #{projectUuid,jdbcType=VARCHAR}
+      and data_type = #{dataType,jdbcType=VARCHAR}
   </select>
 
   <select id="scrollLineHashes" parameterType="map" resultType="org.sonar.db.source.LineHashesWithKeyDto" fetchSize="${_scrollFetchSize}" resultSetType="FORWARD_ONLY">
   </select>
 
   <select id="selectLineHashesVersion" parameterType="map" resultType="Integer">
-    SELECT line_hashes_version
-    FROM file_sources
-    WHERE file_uuid = #{fileUuid,jdbcType=VARCHAR} and data_type=#{dataType,jdbcType=VARCHAR}
+    SELECT
+      line_hashes_version
+    FROM
+      file_sources
+    WHERE
+      file_uuid = #{fileUuid,jdbcType=VARCHAR}
+      and data_type=#{dataType,jdbcType=VARCHAR}
   </select>
 
   <insert id="insert" parameterType="org.sonar.db.source.FileSourceDto" useGeneratedKeys="false">
       src_hash = #{srcHash,jdbcType=VARCHAR},
       revision = #{revision,jdbcType=VARCHAR}
     where
-      id = #{id}
+      id = #{id,jdbcType=INTEGER}
   </update>
 
 </mapper>