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

org.sonar.db.loadedtemplate.LoadedTemplateMapper.xml Maven / Gradle / Ivy

There is a newer version: 6.3.1
Show newest version
<?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.loadedtemplate.LoadedTemplateMapper">

  <resultMap id="loadedTemplateResultMap" type="LoadedTemplate">
    <result property="id" column="id"/>
    <result property="key" column="kee"/>
    <result property="type" column="template_type"/>
  </resultMap>

  <select id="countByTypeAndKey" parameterType="map" resultType="int">
    SELECT count(1)
    FROM loaded_templates
    WHERE kee = #{key} AND template_type = #{type}
  </select>

  <insert id="insert" parameterType="LoadedTemplate" keyColumn="id" useGeneratedKeys="true" keyProperty="id">
    INSERT INTO loaded_templates (kee, template_type)
    VALUES (#{key}, #{type})
  </insert>

  <delete id="delete" parameterType="map">
    delete from loaded_templates where kee = #{key} AND template_type = #{type}
  </delete>
</mapper>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy