<update id="updateNodeInfo">
update tb_xxx
set node = jsonb_concat(node, #{node,typeHandler=com.fly.MapHandler}::jsonb)
where id = #{id}
</update>
其中node字段类型为jsonb,主要使用jsonb_concat函数来实现部分更新
<update id="updateNodeInfo">
update tb_xxx
set node = jsonb_concat(node, #{node,typeHandler=com.fly.MapHandler}::jsonb)
where id = #{id}
</update>
其中node字段类型为jsonb,主要使用jsonb_concat函数来实现部分更新
本文标题:Mybatis修改Postgres中的json数据,实现部分修改
本文链接:https://www.haomeiwen.com/subject/xhsbsdtx.html
网友评论