mappers.StreamSinkExtEntityMapper.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="org.apache.inlong.manager.dao.mapper.StreamSinkExtEntityMapper"> <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.StreamSinkExtEntity"> <id column="id" jdbcType="INTEGER" property="id"/> <result column="sink_type" jdbcType="VARCHAR" property="sinkType"/> <result column="sink_id" jdbcType="INTEGER" property="sinkId"/> <result column="key_name" jdbcType="VARCHAR" property="keyName"/> <result column="key_value" jdbcType="VARCHAR" property="keyValue"/> <result column="is_deleted" jdbcType="INTEGER" property="isDeleted"/> <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/> </resultMap> <sql id="Base_Column_List"> id, sink_type, sink_id, key_name, key_value, is_deleted, modify_time </sql> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> select <include refid="Base_Column_List"/> from stream_sink_ext where id = #{id,jdbcType=INTEGER} </select> <select id="selectBySinkTypeAndId" resultMap="BaseResultMap"> select <include refid="Base_Column_List"/> from stream_sink_ext where sink_type = #{sinkType, jdbcType=VARCHAR} and sink_id = #{sinkId, jdbcType=INTEGER} and is_deleted = 0 </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> delete from stream_sink_ext where id = #{id,jdbcType=INTEGER} </delete> <delete id="deleteBySinkTypeAndId"> delete from stream_sink_ext where sink_type = #{sinkType, jdbcType=VARCHAR} and sink_id = #{sinkId, jdbcType=INTEGER} </delete> <insert id="insert" parameterType="org.apache.inlong.manager.dao.entity.StreamSinkExtEntity"> insert into stream_sink_ext (id, sink_type, sink_id, key_name, key_value, is_deleted, modify_time) values (#{id,jdbcType=INTEGER}, #{sinkType,jdbcType=VARCHAR}, #{sinkId,jdbcType=INTEGER}, #{keyName,jdbcType=VARCHAR}, #{keyValue,jdbcType=VARCHAR}, #{isDeleted,jdbcType=INTEGER}, #{modifyTime,jdbcType=TIMESTAMP}) </insert> <insert id="insertSelective" parameterType="org.apache.inlong.manager.dao.entity.StreamSinkExtEntity"> insert into stream_sink_ext <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="sinkType != null"> sink_type, </if> <if test="sinkId != null"> sink_id, </if> <if test="keyName != null"> key_name, </if> <if test="keyValue != null"> key_value, </if> <if test="isDeleted != null"> is_deleted, </if> <if test="modifyTime != null"> modify_time, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=INTEGER}, </if> <if test="sinkType != null"> #{sinkType,jdbcType=VARCHAR}, </if> <if test="sinkId != null"> #{sinkId,jdbcType=INTEGER}, </if> <if test="keyName != null"> #{keyName,jdbcType=VARCHAR}, </if> <if test="keyValue != null"> #{keyValue,jdbcType=VARCHAR}, </if> <if test="isDeleted != null"> #{isDeleted,jdbcType=INTEGER}, </if> <if test="modifyTime != null"> #{modifyTime,jdbcType=TIMESTAMP}, </if> </trim> </insert> <update id="updateByPrimaryKeySelective" parameterType="org.apache.inlong.manager.dao.entity.StreamSinkExtEntity"> update stream_sink_ext <set> <if test="sinkType != null"> sink_type = #{sinkType,jdbcType=VARCHAR}, </if> <if test="sinkId != null"> sink_id = #{sinkId,jdbcType=INTEGER}, </if> <if test="keyName != null"> key_name = #{keyName,jdbcType=VARCHAR}, </if> <if test="keyValue != null"> key_value = #{keyValue,jdbcType=VARCHAR}, </if> <if test="isDeleted != null"> is_deleted = #{isDeleted,jdbcType=INTEGER}, </if> <if test="modifyTime != null"> modify_time = #{modifyTime,jdbcType=TIMESTAMP}, </if> </set> where id = #{id,jdbcType=INTEGER} </update> <update id="updateByPrimaryKey" parameterType="org.apache.inlong.manager.dao.entity.StreamSinkExtEntity"> update stream_sink_ext set sink_type = #{sinkType,jdbcType=VARCHAR}, sink_id = #{sinkId,jdbcType=INTEGER}, key_name = #{keyName,jdbcType=VARCHAR}, key_value = #{keyValue,jdbcType=VARCHAR}, is_deleted = #{isDeleted,jdbcType=INTEGER}, modify_time = #{modifyTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=INTEGER} </update> <update id="logicDeleteAll"> update stream_sink_ext set is_deleted = 1 where sink_id = #{sinkId, jdbcType=INTEGER} and is_deleted = 0 </update> </mapper>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy