aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-db/src/main/resources/org/sonar/db
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2017-01-13 16:35:16 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2017-01-16 13:01:40 +0100
commitb063b87fa456cb49cba2afde0e88bff83ecdaedc (patch)
treeebb11c98dfe5be7e87c1e856debd7686b5b983e6 /sonar-db/src/main/resources/org/sonar/db
parente09bee5fed18be0ff8730c510ff3d72156957529 (diff)
downloadsonarqube-b063b87fa456cb49cba2afde0e88bff83ecdaedc.tar.gz
sonarqube-b063b87fa456cb49cba2afde0e88bff83ecdaedc.zip
SONAR-8613 add filter on keys to OrganizationDao.selectByQuery
Diffstat (limited to 'sonar-db/src/main/resources/org/sonar/db')
-rw-r--r--sonar-db/src/main/resources/org/sonar/db/organization/OrganizationMapper.xml8
1 files changed, 8 insertions, 0 deletions
diff --git a/sonar-db/src/main/resources/org/sonar/db/organization/OrganizationMapper.xml b/sonar-db/src/main/resources/org/sonar/db/organization/OrganizationMapper.xml
index e120713908c..c7ab1ea8461 100644
--- a/sonar-db/src/main/resources/org/sonar/db/organization/OrganizationMapper.xml
+++ b/sonar-db/src/main/resources/org/sonar/db/organization/OrganizationMapper.xml
@@ -75,6 +75,14 @@
<sql id="sqlSelectByQuery">
from organizations org
+ <where>
+ <if test="query.keys != null">
+ org.kee in
+ <foreach collection="query.keys" open="(" close=")" item="key" separator=",">
+ #{key, jdbcType=VARCHAR}
+ </foreach>
+ </if>
+ </where>
</sql>
<insert id="insert" parameterType="Organization" useGeneratedKeys="false">