1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-28 23:20:10 +02:00

сделал tx = db.Begin()

This commit is contained in:
Nikitin Aleksandr
2024-04-03 14:33:36 +03:00
parent 73517a3d8b
commit 73f44cee02

View File

@@ -433,15 +433,15 @@ loop:
func RawMultipleSQL(db *gorm.DB, TextSQL string) *gorm.DB { func RawMultipleSQL(db *gorm.DB, TextSQL string) *gorm.DB {
var tx *gorm.DB var tx *gorm.DB
var err error var err error
tx = db //tx = db
if tx == nil { if db == nil {
log.Error("RawMultipleSQL() error: db =nil") log.Error("RawMultipleSQL() error: db =nil")
return tx return tx
} }
//запустим транзакцию //запустим транзакцию
tx.Begin() tx = db.Begin()
defer tx.Commit() defer tx.Commit()
// //