summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-03-01 10:08:24 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-03-01 15:08:34 +0100
commitcf56661cb780682a98030a55f7f4bb1c4a033d42 (patch)
treefe3fec6bbc8f3142ce60458407e983fb6c2d90d1
parent450f1eb2189848ff292c6286db4186d7ffd487ec (diff)
downloadsonarqube-cf56661cb780682a98030a55f7f4bb1c4a033d42.tar.gz
sonarqube-cf56661cb780682a98030a55f7f4bb1c4a033d42.zip
SONAR-7330 remove unused SQL requests from RuleMapper
-rw-r--r--sonar-db/src/main/java/org/sonar/db/rule/RuleMapper.java10
-rw-r--r--sonar-db/src/main/resources/org/sonar/db/rule/RuleMapper.xml41
2 files changed, 0 insertions, 51 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/rule/RuleMapper.java b/sonar-db/src/main/java/org/sonar/db/rule/RuleMapper.java
index 8001cc380fb..c98b551dbd0 100644
--- a/sonar-db/src/main/java/org/sonar/db/rule/RuleMapper.java
+++ b/sonar-db/src/main/java/org/sonar/db/rule/RuleMapper.java
@@ -19,9 +19,7 @@
*/
package org.sonar.db.rule;
-import java.sql.Timestamp;
import java.util.List;
-import javax.annotation.Nullable;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.ResultHandler;
import org.sonar.api.rule.RuleKey;
@@ -53,25 +51,17 @@ public interface RuleMapper {
void update(RuleDto rule);
- void batchInsert(RuleDto rule);
-
void insert(RuleDto rule);
- List<RuleParamDto> selectAllParams();
-
List<RuleParamDto> selectParamsByRuleIds(@Param("ruleIds") List<Integer> ruleIds);
List<RuleParamDto> selectParamsByRuleKey(RuleKey ruleKey);
List<RuleParamDto> selectParamsByRuleKeys(@Param("ruleKeys") List<RuleKey> ruleKeys);
- RuleParamDto selectParamByRuleAndKey(@Param("ruleId") Integer ruleId, @Param("key") String key);
-
void insertParameter(RuleParamDto param);
void updateParameter(RuleParamDto param);
void deleteParameter(Integer paramId);
-
- List<RuleDto> selectAfterDate(@Nullable @Param("date") Timestamp timestamp);
}
diff --git a/sonar-db/src/main/resources/org/sonar/db/rule/RuleMapper.xml b/sonar-db/src/main/resources/org/sonar/db/rule/RuleMapper.xml
index aded450d199..fd22b8d0576 100644
--- a/sonar-db/src/main/resources/org/sonar/db/rule/RuleMapper.xml
+++ b/sonar-db/src/main/resources/org/sonar/db/rule/RuleMapper.xml
@@ -39,17 +39,6 @@
from rules r
</select>
- <select id="selectAfterDate" resultType="Rule" fetchSize="${_scrollFetchSize}" resultSetType="FORWARD_ONLY">
- select
- <include refid="selectColumns"/>
- from rules r
- <where>
- <if test="date != null">
- r.updated_at IS NULL or r.updated_at &gt;= #{date}
- </if>
- </where>
- </select>
-
<select id="selectEnabledAndNonManual" resultType="Rule">
select
<include refid="selectColumns"/>
@@ -171,23 +160,6 @@
#{noteUpdatedAt}, #{createdAt}, #{updatedAt})
</insert>
- <insert id="batchInsert" parameterType="Rule" useGeneratedKeys="false">
- insert into rules
- <include refid="insertColumns"/>
- 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},
- #{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,jdbcType=TIMESTAMP},
- #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}
- )
- </insert>
-
<delete id="deleteParams" parameterType="Integer">
delete from active_rule_parameters where rules_parameter_id=#{id}
</delete>
@@ -197,12 +169,6 @@
p.description as "description"
</sql>
- <select id="selectAllParams" resultType="RuleParam">
- select
- <include refid="paramColumns"/>
- from rules_parameters p
- </select>
-
<select id="selectParamsByRuleIds" resultType="RuleParam">
SELECT
<include refid="paramColumns"/>
@@ -232,13 +198,6 @@
</foreach>
</select>
- <select id="selectParamByRuleAndKey" resultType="RuleParam">
- SELECT
- <include refid="paramColumns"/>
- FROM rules_parameters p
- WHERE p.rule_id=#{ruleId} AND p.name=#{key}
- </select>
-
<delete id="deleteParameter" parameterType="Integer">
delete from rules_parameters where id=#{id}
</delete>