| 程序包 | 说明 |
|---|---|
| com.litongjava.db.activerecord |
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
DbPro.tx(Config config,
int transactionLevel,
IAtom atom)
Execute transaction.
|
boolean |
DbPro.tx(IAtom atom)
Execute transaction with default transaction level.
|
static boolean |
Db.tx(IAtom atom)
Execute transaction with default transaction level.
|
boolean |
DbPro.tx(int transactionLevel,
IAtom atom) |
static boolean |
Db.tx(int transactionLevel,
IAtom atom) |
Future<Boolean> |
DbPro.txInNewThread(IAtom atom)
主要用于嵌套事务场景
实例:https://jfinal.com/feedback/4008
默认情况下嵌套事务会被合并成为一个事务,那么内层与外层任何地方回滚事务
所有嵌套层都将回滚事务,也就是说嵌套事务无法独立提交与回滚
使用 txInNewThread(...)
|
static Future<Boolean> |
Db.txInNewThread(IAtom atom)
主要用于嵌套事务场景
实例:https://jfinal.com/feedback/4008
默认情况下嵌套事务会被合并成为一个事务,那么内层与外层任何地方回滚事务 所有嵌套层都将回滚事务,也就是说嵌套事务无法独立提交与回滚
使用 txInNewThread(...)
|
Future<Boolean> |
DbPro.txInNewThread(int transactionLevel,
IAtom atom) |
static Future<Boolean> |
Db.txInNewThread(int transactionLevel,
IAtom atom) |
Copyright © 2024. All rights reserved.