aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-dao
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-db-dao')
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java4
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileMapper.java2
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/QualityProfileMapper.xml27
3 files changed, 8 insertions, 25 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java
index f6133648150..7d2d4c1838b 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java
@@ -81,10 +81,6 @@ public class QualityProfileDao implements Dao {
return mapper(dbSession).selectBuiltInRuleProfilesWithActiveRules();
}
- public List<QProfileDto> selectBuiltInRuleProfilesWithoutActiveRules(DbSession dbSession) {
- return mapper(dbSession).selectBuiltInProfilesWithoutActiveRules();
- }
-
@CheckForNull
public RulesProfileDto selectRuleProfile(DbSession dbSession, String ruleProfileUuid) {
return mapper(dbSession).selectRuleProfile(ruleProfileUuid);
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileMapper.java
index 1c2fb6417d3..27fc6f28def 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileMapper.java
@@ -44,8 +44,6 @@ public interface QualityProfileMapper {
List<RulesProfileDto> selectBuiltInRuleProfilesWithActiveRules();
- List<QProfileDto> selectBuiltInProfilesWithoutActiveRules();
-
@CheckForNull
RulesProfileDto selectRuleProfile(@Param("uuid") String ruleProfileUuid);
diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/QualityProfileMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/QualityProfileMapper.xml
index 8f4ae191e5e..fdcd8dc0b56 100644
--- a/server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/QualityProfileMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/QualityProfileMapper.xml
@@ -147,7 +147,8 @@
INNER JOIN default_qprofiles dp ON dp.qprofile_uuid = oqp.uuid
WHERE
rp.is_built_in = ${_true}
- AND rp.language IN <foreach collection="languages" open="(" close=")" item="language" separator=",">#{language, jdbcType=VARCHAR}</foreach>
+ AND rp.language IN <foreach collection="languages" open="(" close=")" item="language"
+ separator=",">#{language, jdbcType=VARCHAR}</foreach>
AND NOT EXISTS (
SELECT 1 FROM active_rules ar
INNER JOIN rules r ON r.uuid = ar.rule_uuid AND r.status &lt;&gt; 'REMOVED'
@@ -155,21 +156,6 @@
)
</select>
- <select id="selectBuiltInProfilesWithoutActiveRules" parameterType="map"
- resultType="org.sonar.db.qualityprofile.QProfileDto">
- SELECT
- <include refid="qProfileColumns"/>
- FROM org_qprofiles oqp
- INNER JOIN rules_profiles rp ON oqp.rules_profile_uuid = rp.uuid
- WHERE
- rp.is_built_in = ${_true}
- AND NOT EXISTS (
- SELECT 1 FROM active_rules ar
- INNER JOIN rules r ON r.uuid = ar.rule_uuid AND r.status &lt;&gt; 'REMOVED'
- WHERE profile_uuid = rp.uuid
- )
- </select>
-
<select id="selectDefaultProfiles" parameterType="map" resultType="org.sonar.db.qualityprofile.QProfileDto">
select
<include refid="qProfileColumns"/>
@@ -177,7 +163,8 @@
inner join rules_profiles rp on oqp.rules_profile_uuid = rp.uuid
inner join default_qprofiles dp on dp.qprofile_uuid = oqp.uuid
where
- dp.language in <foreach collection="languages" open="(" close=")" item="language" separator=",">#{language, jdbcType=VARCHAR}</foreach>
+ dp.language in <foreach collection="languages" open="(" close=")" item="language"
+ separator=",">#{language, jdbcType=VARCHAR}</foreach>
and rp.language = dp.language
</select>
@@ -218,7 +205,8 @@
inner join rules_profiles rp on oqp.rules_profile_uuid = rp.uuid
where
rp.name = #{name, jdbcType=VARCHAR}
- and rp.language in <foreach collection="languages" open="(" close=")" item="language" separator=",">#{language, jdbcType=VARCHAR}</foreach>
+ and rp.language in <foreach collection="languages" open="(" close=")" item="language"
+ separator=",">#{language, jdbcType=VARCHAR}</foreach>
</select>
<select id="selectByUuid" parameterType="string" resultType="org.sonar.db.qualityprofile.QProfileDto">
@@ -290,7 +278,8 @@
inner join rules_profiles rp on oqp.rules_profile_uuid = rp.uuid
inner join project_qprofiles pqp ON pqp.profile_key = oqp.uuid
where
- rp.language in <foreach collection="languages" open="(" close=")" item="language" separator=",">#{language, jdbcType=VARCHAR}</foreach>
+ rp.language in <foreach collection="languages" open="(" close=")" item="language"
+ separator=",">#{language, jdbcType=VARCHAR}</foreach>
and pqp.project_uuid = #{projectUuid, jdbcType=VARCHAR}
</select>