mappers.SortClusterConfgiEntityMapper.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.SortClusterConfgiEntityMapper"> <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.SortClusterConfigEntity"> <id column="id" jdbcType="INTEGER" property="id" /> <result column="cluster_name" jdbcType="VARCHAR" property="clusterName" /> <result column="task_name" jdbcType="VARCHAR" property="taskName" /> <result column="sink_type" jdbcType="VARCHAR" property="sinkType" /> </resultMap> <sql id="Base_Column_List"> id, cluster_name, task_name, sink_type </sql> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from sort_cluster_config where id = #{id,jdbcType=INTEGER} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> delete from sort_cluster_config where id = #{id,jdbcType=INTEGER} </delete> <insert id="insert" parameterType="org.apache.inlong.manager.dao.entity.SortClusterConfigEntity"> insert into sort_cluster_config (id, cluster_name, task_name, sink_type) values (#{id,jdbcType=INTEGER}, #{clusterName,jdbcType=VARCHAR}, #{taskName,jdbcType=VARCHAR}, #{sinkType,jdbcType=VARCHAR}) </insert> <insert id="insertSelective" parameterType="org.apache.inlong.manager.dao.entity.SortClusterConfigEntity"> insert into sort_cluster_config <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="clusterName != null"> cluster_name, </if> <if test="taskName != null"> task_name, </if> <if test="sinkType != null"> sink_type, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=INTEGER}, </if> <if test="clusterName != null"> #{clusterName,jdbcType=VARCHAR}, </if> <if test="taskName != null"> #{taskName,jdbcType=VARCHAR}, </if> <if test="sinkType != null"> #{sinkType,jdbcType=VARCHAR}, </if> </trim> </insert> <update id="updateByPrimaryKeySelective" parameterType="org.apache.inlong.manager.dao.entity.SortClusterConfigEntity"> update sort_cluster_config <set> <if test="clusterName != null"> cluster_name = #{clusterName,jdbcType=VARCHAR}, </if> <if test="taskName != null"> task_name = #{taskName,jdbcType=VARCHAR}, </if> <if test="sinkType != null"> sink_type = #{sinkType,jdbcType=VARCHAR}, </if> </set> where id = #{id,jdbcType=INTEGER} </update> <update id="updateByPrimaryKey" parameterType="org.apache.inlong.manager.dao.entity.SortClusterConfigEntity"> update sort_cluster_config set cluster_name = #{clusterName,jdbcType=VARCHAR}, task_name = #{taskName,jdbcType=VARCHAR}, sink_type = #{sinkType,jdbcType=VARCHAR} where id = #{id,jdbcType=INTEGER} </update> <select id="selectTasksByClusterName" parameterType="java.lang.String" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from sort_cluster_config where cluster_name = #{clusterName, jdbcType=VARCHAR} </select> </mapper>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy