SQL 修饰
Seata 的隔离级别默认为读未提交,该模式下本文表中的 select 语句的 SQL 修饰用法都是支持的;使用 for update 代理可以让 Seata 达到读已提交,该模式下 select 语句的用法只能部分支持。
DML 语句支持
类型 | SQL 实例 | 是否支持 |
---|---|---|
AND & OR | UPDATE … WHERE col_name1=expr1 AND col_name2= expr2 | 是 |
LIKE | UPDATE ... WHERE col_name1 LIKE 'NE' | 是 |
通配符 | UPDATE ... WHERE col_name1 LIKE 'NE%' | 是 |
BETWEEN | UPDATE ... WHERE col_name1 BETWEEN expr1 AND expr2 | 是 |
ON DUPLICATE | INSERT INTO tb1_name [(col_name,...)]VALUES (\{expr | DEFAULT},...),(...),...[ ON DUPLICATE KEY UPDATE col_name=expr, ... ] | 是 |
Select 语句支持
类型 | SQL 实例 | 读未提交 | 读已提交 |
---|---|---|---|
AND & OR | SELECT * FROM tb1_name WHERE col_name1=expr1 AND col_name2= expr2 | 是 | 是 |
ORDER BY | SELECT col_name1, col_name2 FROM tb1_name ORDER BY col_name1 | 是 | 是 |
GROUP BY | SELECT col_name1, col_name2 FROM tb1_name GROUP BY col_name1 | 是 | 是 |
LIKE | SELECT col_name1, col_name2 FROM tb1_name WHERE col_name1 LIKE 'NE' | 是 | 是 |