05-Seata下SQL使用限制

  • 不支持 SQL 嵌套

  • 不支持多表复杂 SQL(自1.6.0版本,MySQL支持UPDATE JOIN语句,详情请看

  • 不支持存储过程、触发器

  • 部分数据库不支持批量更新,在使用 MySQL、Mariadb、PostgreSQL9.6+作为数据库时支持批量,批量更新方式如下以 Java 为例

    复制代码
      // use JdbcTemplate
      public void batchUpdate() {
          jdbcTemplate.batchUpdate(
              "update storage_tbl set count = count -1 where id = 1",
              "update storage_tbl set count = count -1 where id = 2"
          );
      }
    
      // use Statement
      public void batchUpdateTwo() {
          statement.addBatch("update storage_tbl set count = count -1 where id = 1");
          statement.addBatch("update storage_tbl set count = count -1 where id = 2");
          statement.executeBatch();
      }

DML 语句类型、SQL 实例以及 Seata 是否支持,

相关推荐
短剑重铸之日19 小时前
《SpringCloud实用版》 Seata 分布式事务实战:AT / TCC / Saga /XA
后端·spring·spring cloud·seata·分布式事务
enjoy编程3 天前
Spring boot 4 & JAVA 25 微服务事务实战:Seata 的 AT、TCC、Saga 、XA、Spring JDBC 事务 如何选型及使用
seata·分布式事务·xa·saga·ta·tcc·全局事务
递归尽头是星辰12 天前
Spring Cloud Alibaba 核心理论体系:Nacos、Sentinel、Seata深度解析
spring cloud·nacos·sentinel·seata·微服务治理
南屿欣风12 天前
Seata 中 TC 二阶提交机制核心
seata
七夜zippoe14 天前
分布式事务解决方案 Seata AT模式深度解析
java·sql·seata·at·xa·undo log
是三好1 个月前
分布式事务seata
java·分布式·seata
YDS8291 个月前
SpringCloud —— 分布式事务管理Seata详解
分布式·spring·spring cloud·seata
serendipity_hky1 个月前
【SpringCloud | 第5篇】Seata分布式事务
分布式·后端·spring·spring cloud·seata·openfeign
梁萌2 个月前
分布式事物seata的AT模式实战
分布式·微服务·实战·seata·一致性·事物