diff options
author | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-08-20 17:05:23 +0200 |
---|---|---|
committer | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-08-20 18:18:39 +0200 |
commit | e72b7db9c0983eace302e0bb0fe2c83ade0d1106 (patch) | |
tree | 640b5c31fcee0d0cdd2924d22e3924ffc97de263 /sonar-core | |
parent | c7bdd0a2e79ca01249bd9e8dfbb6aa2839b57af1 (diff) | |
download | sonarqube-e72b7db9c0983eace302e0bb0fe2c83ade0d1106.tar.gz sonarqube-e72b7db9c0983eace302e0bb0fe2c83ade0d1106.zip |
fixed synchronization
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/qualityprofile/db/ActiveRuleMapper.java | 5 | ||||
-rw-r--r-- | sonar-core/src/main/resources/org/sonar/core/qualityprofile/db/ActiveRuleMapper.xml | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/qualityprofile/db/ActiveRuleMapper.java b/sonar-core/src/main/java/org/sonar/core/qualityprofile/db/ActiveRuleMapper.java index 4c3c0773eb5..86a117841ae 100644 --- a/sonar-core/src/main/java/org/sonar/core/qualityprofile/db/ActiveRuleMapper.java +++ b/sonar-core/src/main/java/org/sonar/core/qualityprofile/db/ActiveRuleMapper.java @@ -23,6 +23,7 @@ package org.sonar.core.qualityprofile.db; import org.apache.ibatis.annotations.Param; import javax.annotation.CheckForNull; +import java.sql.Timestamp; import java.util.List; public interface ActiveRuleMapper { @@ -58,8 +59,10 @@ public interface ActiveRuleMapper { List<ActiveRuleParamDto> selectParamsByProfileKey(String profileKey); ActiveRuleDto selectByKey(@Param("profileKey") String profileKey, - @Param("repository") String repository, @Param("rule") String rule ); + @Param("repository") String repository, @Param("rule") String rule); List<ActiveRuleParamDto> selectAllParams(); + List<ActiveRuleDto> selectAfterDate(Timestamp date); + } diff --git a/sonar-core/src/main/resources/org/sonar/core/qualityprofile/db/ActiveRuleMapper.xml b/sonar-core/src/main/resources/org/sonar/core/qualityprofile/db/ActiveRuleMapper.xml index 63c868f2097..b0cbe0057b9 100644 --- a/sonar-core/src/main/resources/org/sonar/core/qualityprofile/db/ActiveRuleMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/qualityprofile/db/ActiveRuleMapper.xml @@ -39,12 +39,10 @@ LEFT JOIN active_rules active_rule_parent ON active_rule_parent.profile_id=profile_parent.id AND a.rule_id=active_rule_parent.rule_id </sql> - <select id="selectAllKeysAfterTimestamp" parameterType="Date" resultType="map"> - SELECT - r.plugin_rule_key as "rulefield", - r.plugin_name as "repository", - qp.kee as "profileKey" - FROM active_rules a + <select id="selectAfterDate" parameterType="Date" resultType="ActiveRule" resultSetType="FORWARD_ONLY"> + select + <include refid="activeRuleKeyColumns"/> + from active_rules a <include refid="activeRuleKeyJoin"/> <where> a.updated_at IS NULL or a.updated_at >= #{id} |