1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "mybatis-3-mapper.dtd">
4 <mapper namespace="org.sonar.db.qualitygate.QualityGateGroupPermissionsMapper">
8 qggp.group_uuid as "groupUuid",
9 qggp.quality_gate_uuid as "qualityGateUuid"
12 <select id="selectByQualityGateAndGroup" parameterType="String" resultType="org.sonar.db.qualitygate.QualityGateGroupPermissionsDto">
14 <include refid="sqlColumns"/>
15 from qgate_group_permissions qggp
17 qggp.group_uuid = #{groupUuid}
18 and qggp.quality_gate_uuid = #{qualityGateUuid}
21 <select id="selectByQualityGateAndGroups" parameterType="map" resultType="org.sonar.db.qualitygate.QualityGateGroupPermissionsDto">
23 <include refid="sqlColumns"/>
24 from qgate_group_permissions qggp
26 <foreach collection="groupUuids" open="(" close=")" item="groupUuid" separator=" or ">
27 qggp.group_uuid = #{groupUuid, jdbcType=VARCHAR}
29 and qggp.quality_gate_uuid = #{qualityGateUuid, jdbcType=VARCHAR}
32 <insert id="insert" useGeneratedKeys="false" parameterType="map">
33 insert into qgate_group_permissions(
39 #{dto.uuid, jdbcType=VARCHAR},
40 #{dto.groupUuid, jdbcType=VARCHAR},
41 #{dto.qualityGateUuid, jdbcType=VARCHAR},
42 #{now, jdbcType=BIGINT}