]> source.dussan.org Git - sonarqube.git/commitdiff
Add some missing jdbcType to PurgeMapper.xml
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 10 Nov 2016 17:31:47 +0000 (18:31 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 14 Nov 2016 11:18:51 +0000 (12:18 +0100)
sonar-db/src/main/resources/org/sonar/db/purge/PurgeMapper.xml

index 8e8424fc56a2144a35b2fd2b265da83c2b1f84a8..98dc09fbf60fdef75e8682b1a9d8471a09cb1850 100644 (file)
@@ -16,7 +16,7 @@
         and (s.purge_status is null or s.purge_status=0)
       </if>
       <if test="componentUuid != null">
-        and s.component_uuid=#{componentUuid}
+        and s.component_uuid=#{componentUuid,jdbcType=VARCHAR}
       </if>
       <if test="status != null">
         and s.status in
@@ -31,7 +31,7 @@
     from
       snapshots s
     where
-      s.component_uuid=#{componentUuid}
+      s.component_uuid=#{componentUuid,jdbcType=VARCHAR}
       and s.status='P'
       and exists(select e.id from events e where e.analysis_uuid=s.uuid)
   </select>
@@ -42,7 +42,7 @@
     from
       snapshots s
     where
-      s.component_uuid=#{componentUuid}
+      s.component_uuid=#{componentUuid,jdbcType=VARCHAR}
       and s.status='P'
       and not exists(select e.id from events e where e.analysis_uuid=s.uuid)
   </select>
@@ -52,7 +52,7 @@
   </select>
 
   <select id="selectComponentsByProjectUuid" resultType="org.sonar.db.purge.IdUuidPair" parameterType="String">
-    select id, uuid from projects where project_uuid=#{uuid} or uuid=#{uuid}
+    select id, uuid from projects where project_uuid=#{uuid,jdbcType=VARCHAR} or uuid=#{uuid,jdbcType=VARCHAR}
   </select>
 
   <delete id="deleteAnalysisMeasures" parameterType="map">
@@ -60,7 +60,7 @@
     where
       analysis_uuid in
       <foreach collection="analysisUuids" open="(" close=")" item="analysisUuid" separator=",">
-        #{analysisUuid}
+        #{analysisUuid,jdbcType=VARCHAR}
       </foreach>
   </delete>
 
@@ -69,7 +69,7 @@
     where
       analysis_uuid in
       <foreach collection="analysisUuids" open="(" close=")" item="analysisUuid" separator=",">
-        #{analysisUuid}
+        #{analysisUuid,jdbcType=VARCHAR}
       </foreach>
   </delete>
 
     where
       analysis_uuid in
       <foreach collection="analysisUuids" open="(" close=")" item="analysisUuid" separator=",">
-        #{analysisUuid}
+        #{analysisUuid,jdbcType=VARCHAR}
       </foreach>
       and component_uuid in
       <foreach collection="componentUuids" open="(" close=")" item="componentUuid" separator=",">
-        #{componentUuid}
+        #{componentUuid,jdbcType=VARCHAR}
       </foreach>
   </delete>
 
@@ -91,7 +91,7 @@
     where
       analysis_uuid in
       <foreach collection="analysisUuids" open="(" close=")" item="analysisUuid" separator=",">
-        #{analysisUuid}
+        #{analysisUuid,jdbcType=VARCHAR}
       </foreach>
   </delete>
 
     where
       analysis_uuid in
       <foreach collection="analysisUuids" open="(" close=")" item="analysisUuid" separator=",">
-        #{analysisUuid}
+        #{analysisUuid,jdbcType=VARCHAR}
       </foreach>
   </delete>
 
     where
       uuid in
       <foreach collection="analysisUuids" open="(" close=")" item="analysisUuid" separator=",">
-        #{analysisUuid}
+        #{analysisUuid,jdbcType=VARCHAR}
       </foreach>
   </delete>
 
     where
       uuid in
       <foreach collection="analysisUuids" open="(" close=")" item="analysisUuid" separator=",">
-        #{analysisUuid}
+        #{analysisUuid,jdbcType=VARCHAR}
       </foreach>
   </update>
 
     where
       component_uuid in
       <foreach collection="componentUuids" open="(" close=")" item="componentUuid" separator=",">
-        #{componentUuid}
+        #{componentUuid,jdbcType=VARCHAR}
       </foreach>
       and resolution is null
   </update>
     where
       component_uuid in
       <foreach collection="componentUuids" open="(" close=")" item="componentUuid" separator=",">
-        #{componentUuid}
+        #{componentUuid,jdbcType=VARCHAR}
       </foreach>
   </delete>
 
     where
       component_uuid in
       <foreach collection="componentUuids" open="(" close=")" item="componentUuid" separator=",">
-        #{componentUuid}
+        #{componentUuid,jdbcType=VARCHAR}
       </foreach>
   </delete>
 
     where
       uuid in
       <foreach collection="componentUuids" open="(" close=")" item="componentUuid" separator=",">
-        #{componentUuid}
+        #{componentUuid,jdbcType=VARCHAR}
       </foreach>
   </delete>
 
   <delete id="deleteComponentManualMeasures" parameterType="map">
     delete from manual_measures where component_uuid in
     <foreach collection="componentUuids" open="(" close=")" item="componentUuid" separator=",">
-      #{componentUuid}
+      #{componentUuid,jdbcType=VARCHAR}
     </foreach>
   </delete>
 
     where
       component_uuid in
       <foreach collection="componentUuids" open="(" close=")" item="componentUuid" separator=",">
-        #{componentUuid}
+        #{componentUuid,jdbcType=VARCHAR}
       </foreach>
   </delete>
 
     delete from issue_changes ic
     where exists (select * from issues i where i.kee=ic.issue_key and i.component_uuid in
     <foreach collection="componentUuids" open="(" close=")" item="componentUuid" separator=",">
-      #{componentUuid}
+      #{componentUuid,jdbcType=VARCHAR}
     </foreach>
     )
   </delete>
     inner join issues on issue_changes.issue_key=issues.kee
     where issues.component_uuid in
     <foreach collection="componentUuids" open="(" close=")" item="componentUuid" separator=",">
-      #{componentUuid}
+      #{componentUuid,jdbcType=VARCHAR}
     </foreach>
   </delete>
 
   <delete id="deleteComponentIssueChanges" databaseId="mysql" parameterType="map">
     delete ic from issue_changes as ic, issues as i where ic.issue_key=i.kee and i.component_uuid in
     <foreach collection="componentUuids" open="(" close=")" item="componentUuid" separator=",">
-      #{componentUuid}
+      #{componentUuid,jdbcType=VARCHAR}
     </foreach>
   </delete>
 
   <delete id="deleteComponentIssues" parameterType="map">
     delete from issues where component_uuid in
     <foreach collection="componentUuids" open="(" close=")" item="componentUuid" separator=",">
-      #{componentUuid}
+      #{componentUuid,jdbcType=VARCHAR}
     </foreach>
   </delete>
 
   <delete id="deleteFileSourcesByProjectUuid">
-    delete from file_sources where project_uuid=#{rootProjectUuid}
+    delete from file_sources where project_uuid=#{rootProjectUuid,jdbcType=VARCHAR}
   </delete>
 
   <delete id="deleteFileSourcesByUuid">
     where
       file_uuid in
       <foreach collection="fileUuids" open="(" close=")" item="fileUuid" separator=",">
-        #{fileUuid}
+        #{fileUuid,jdbcType=VARCHAR}
       </foreach>
   </delete>
 
   <select id="selectOldClosedIssueKeys" parameterType="map" resultType="String">
     SELECT kee FROM issues
-    WHERE project_uuid=#{projectUuid}
+    WHERE project_uuid=#{projectUuid,jdbcType=VARCHAR}
     <choose>
       <when test="toDate == null">
         AND issue_close_date IS NOT NULL
     DELETE FROM issues
     WHERE kee IN
     <foreach collection="keys" open="(" close=")" item="key" separator=",">
-      #{key}
+      #{key,jdbcType=VARCHAR}
     </foreach>
   </delete>
 
     DELETE FROM issue_changes
     WHERE issue_key IN
     <foreach collection="issueKeys" open="(" close=")" item="issueKey" separator=",">
-      #{issueKey}
+      #{issueKey,jdbcType=VARCHAR}
     </foreach>
   </delete>
 
   <delete id="deleteCeActivityByProjectUuid">
-      delete from ce_activity where component_uuid=#{rootProjectUuid}
+      delete from ce_activity where component_uuid=#{rootProjectUuid,jdbcType=VARCHAR}
   </delete>
 
   <delete id="deleteWebhookDeliveriesByProjectUuid">