diff options
author | Dejan Milisavljevic <dejan.milisavljevic@sonarsource.com> | 2024-10-10 16:21:04 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-10-16 20:03:01 +0000 |
commit | 5038a353ca5917a647e5613859fbf62e756f4a21 (patch) | |
tree | 06f18963373820c45f2f08e355271a6b03379a07 /server/sonar-db-dao/src/main/java/org/sonar/db | |
parent | 32cec354bfc868d591e6356ee85728c5ecba51d1 (diff) | |
download | sonarqube-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.java | 4 | ||||
-rw-r--r-- | server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleMapper.java | 3 |
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); |