You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "songshengping (via GitHub)" <gi...@apache.org> on 2023/03/11 03:31:16 UTC

[GitHub] [shardingsphere] songshengping commented on issue #6665: sharding jdbc do not support batch update

songshengping commented on issue #6665:
URL: https://github.com/apache/shardingsphere/issues/6665#issuecomment-1464811585

   <foreach collection="list" item="item" index="index" separator=";">
         update t_table
         <set>
           <if test="item.buyPrice != null">
             buy_price = #{item.buyPrice,jdbcType=DECIMAL},
           </if>
         </set>
         <where>
           <if test="item.id != null">
             and id = #{item.id,jdbcType=BIGINT}
           </if>
           <if test="item.userId != null">
             and user_id = #{item.userId,jdbcType=BIGINT}
           </if>
           <if test="item.updateTime != null">
             and update_time  <![CDATA[ <= ]]> #{item.updateTime,jdbcType=TIMESTAMP}
           </if>
         </where>
       </foreach>
   
   
   
   my mybatis is like this. My database subtab key is user_id,The value of user_id is the same for all the batch SQL.
   Is this situation still not supported for batch updates?


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org