vernedeng commented on code in PR #8913:
URL: https://github.com/apache/inlong/pull/8913#discussion_r1327940177
##########
inlong-manager/manager-dao/src/main/resources/mappers/DataNodeEntityMapper.xml:
##########
@@ -212,5 +212,55 @@
</if>
</where>
</delete>
-
+ <insert id="copy">
+ insert into data_node (name, display_name, type, url, username,
+ token, ext_params, description, tenant,
+ in_charges, status, creator, modifier)
+ select #{newName, jdbcType=VARCHAR},
+ display_name,
+ type,
+ url,
+ username,
+ token,
+ ext_params,
+ description,
+ #{to, jdbcType=VARCHAR},
+ in_charges,
+ status,
+ creator,
+ modifier
+ from data_node
+ <where>
+ name = #{name, jdbcType=VARCHAR}
+ and type = #{type, jdbcType=VARCHAR}
+ and is_deleted = 0
+ and tenant = #{from, jdbcType=VARCHAR}
+ </where>
+ </insert>
+ <select id="selectByIdSelective"
+ parameterType="org.apache.inlong.manager.dao.entity.DataNodeEntity"
+ resultMap="BaseResultMap">
+ select
+ <include refid="Base_Column_List"/>
+ from data_node
+ <where>
+ <if test="type != null">
Review Comment:
No need to do that, it's insert, not update.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]