aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-dao/src/main/java/org/sonar/db
diff options
context:
space:
mode:
authorDejan Milisavljevic <dejan.milisavljevic@sonarsource.com>2024-10-10 16:21:04 +0200
committersonartech <sonartech@sonarsource.com>2024-10-16 20:03:01 +0000
commit5038a353ca5917a647e5613859fbf62e756f4a21 (patch)
tree06f18963373820c45f2f08e355271a6b03379a07 /server/sonar-db-dao/src/main/java/org/sonar/db
parent32cec354bfc868d591e6356ee85728c5ecba51d1 (diff)
downloadsonarqube-5038a353ca5917a647e5613859fbf62e756f4a21.tar.gz
sonarqube-5038a353ca5917a647e5613859fbf62e756f4a21.zip
SONAR-23250 Initial population of active_rules with impacts
Diffstat (limited to 'server/sonar-db-dao/src/main/java/org/sonar/db')
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDao.java4
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleMapper.java3
2 files changed, 7 insertions, 0 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDao.java
index 4e6501a043d..e085a3cc315 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDao.java
@@ -68,6 +68,10 @@ public class ActiveRuleDao implements Dao {
return mapper(dbSession).selectByRuleUuid(ruleUuid);
}
+ public List<ActiveRuleDto> selectByRepository(DbSession dbSession, String repositoryKey, String repositoryLanguage) {
+ return mapper(dbSession).selectByRepository(repositoryKey, repositoryLanguage);
+ }
+
public List<OrgActiveRuleDto> selectByRuleUuids(DbSession dbSession, List<String> uuids) {
return executeLargeInputs(uuids, chunk -> mapper(dbSession).selectByRuleUuids(chunk));
}
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleMapper.java
index 1e276615f37..d2b2dddfdbe 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleMapper.java
@@ -47,6 +47,9 @@ public interface ActiveRuleMapper {
List<ActiveRuleDto> selectByRuleUuid(String ruleUuid);
+ List<ActiveRuleDto> selectByRepository(@Param("repositoryKey") String repositoryKey,
+ @Param("repositoryLanguage") String repositoryLanguage);
+
List<OrgActiveRuleDto> selectByRuleUuids(@Param("ruleUuids") List<String> partitionOfRuleUuids);
List<OrgActiveRuleDto> selectByProfileUuid(String uuid);