All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.db.ce.CeTaskCharacteristicMapper.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "mybatis-3-mapper.dtd">

<mapper namespace="org.sonar.db.ce.CeTaskCharacteristicMapper">

  <sql id="columns">
    c.uuid as "uuid",
    c.task_uuid as "taskUuid",
    c.kee as "key",
    c.text_value as "value"
  </sql>

  <select id="selectByTaskUuids" parameterType="map" resultType="CeTaskCharacteristic">
    SELECT
      <include refid="columns"/>
    FROM
      ce_task_characteristics c
    WHERE
      c.task_uuid in <foreach collection="taskUuids" open="(" close=")" item="taskUuid" separator=",">#{taskUuid,jdbcType=VARCHAR}</foreach>
  </select>

  <insert id="insert" parameterType="CeTaskCharacteristic" useGeneratedKeys="false">
    insert into ce_task_characteristics (
    uuid,
    task_uuid,
    kee,
    text_value
    )
    values (
    #{uuid,jdbcType=VARCHAR},
    #{taskUuid,jdbcType=VARCHAR},
    #{key,jdbcType=VARCHAR},
    #{value,jdbcType=VARCHAR}
    )
  </insert>

  <delete id="deleteByTaskUuids" parameterType="string">
    DELETE
    FROM ce_task_characteristics
    WHERE
      task_uuid IN
      <foreach collection="taskUuids" open="(" close=")" item="taskUuid" separator=",">
        #{taskUuid,jdbcType=VARCHAR}
      </foreach>
  </delete>
</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy