org.sonar.db.plugin.PluginMapper.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-db-dao Show documentation
Show all versions of sonar-db-dao Show documentation
Open source platform for continuous inspection of code quality
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.plugin.PluginMapper"> <sql id="sqlColumns"> uuid, kee, base_plugin_key as basePluginKey, file_hash as fileHash, created_at as createdAt, updated_at as updatedAt </sql> <select id="selectByKey" parameterType="String" resultType="org.sonar.db.plugin.PluginDto"> select <include refid="sqlColumns" /> from plugins where kee = #{key,jdbcType=VARCHAR} </select> <select id="selectAll" resultType="org.sonar.db.plugin.PluginDto"> select <include refid="sqlColumns" /> from plugins </select> <insert id="insert" parameterType="org.sonar.db.plugin.PluginDto" useGeneratedKeys="false"> insert into plugins ( uuid, kee, base_plugin_key, file_hash, created_at, updated_at ) values ( #{uuid,jdbcType=VARCHAR}, #{kee,jdbcType=VARCHAR}, #{basePluginKey,jdbcType=VARCHAR}, #{fileHash,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP} ) </insert> <update id="update" parameterType="org.sonar.db.plugin.PluginDto"> update plugins set base_plugin_key=#{basePluginKey,jdbcType=VARCHAR}, file_hash=#{fileHash,jdbcType=VARCHAR}, updated_at=#{updatedAt,jdbcType=BIGINT} where uuid=#{uuid,jdbcType=VARCHAR} </update> </mapper>