summaryrefslogtreecommitdiffstats
path: root/vendor/xorm.io/xorm/session_tx.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/xorm.io/xorm/session_tx.go')
-rw-r--r--vendor/xorm.io/xorm/session_tx.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/xorm.io/xorm/session_tx.go b/vendor/xorm.io/xorm/session_tx.go
index 57791703b5..8763784c13 100644
--- a/vendor/xorm.io/xorm/session_tx.go
+++ b/vendor/xorm.io/xorm/session_tx.go
@@ -84,3 +84,8 @@ func (session *Session) Commit() error {
}
return nil
}
+
+// IsInTx if current session is in a transaction
+func (session *Session) IsInTx() bool {
+ return !session.isAutoCommit
+}