org.sonar.db.user.AuthorMapper.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="org.sonar.db.user.AuthorMapper"> <select id="selectByLogin" parameterType="string" resultType="Author"> SELECT id, person_id AS personId, login, created_at AS createdAt, updated_at AS updatedAt FROM authors WHERE login=#{id} </select> <select id="countDeveloperLogins" parameterType="long" resultType="int"> SELECT count(id) FROM authors WHERE person_id=#{id} </select> <insert id="insert" parameterType="Author" keyColumn="id" useGeneratedKeys="true" keyProperty="id"> INSERT INTO authors (person_id, login, created_at, updated_at) VALUES (#{personId}, #{login}, #{createdAt}, #{updatedAt}) </insert> <select id="selectScmAccountsByDeveloperUuids" parameterType="String" resultType="String"> SELECT a.login FROM authors a INNER JOIN projects p ON p.id=a.person_id <where> and p.uuid in <foreach collection="uuids" open="(" close=")" item="uuid" separator=","> #{uuid} </foreach> </where> </select> </mapper>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy