From dcce8ace9eaf176a4e3b8f34d81c3215d33bd245 Mon Sep 17 00:00:00 2001 From: hoteas Date: Thu, 18 Aug 2022 11:36:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E4=BA=8B=E5=8A=A1?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/hotimedb.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db/hotimedb.go b/db/hotimedb.go index cea7e59..91fdab1 100644 --- a/db/hotimedb.go +++ b/db/hotimedb.go @@ -271,7 +271,11 @@ func (that *HoTimeDB) GetType() string { // Action 事务,如果action返回true则执行成功;false则回滚 func (that *HoTimeDB) Action(action func(db HoTimeDB) (isSuccess bool)) (isSuccess bool) { - db := HoTimeDB{DB: that.DB, HoTimeCache: that.HoTimeCache, Prefix: that.Prefix} + db := HoTimeDB{that.DB, that.ContextBase, that.DBName, + that.HoTimeCache, that.Log, that.Type, + that.Prefix, that.LastQuery, that.LastData, + that.ConnectFunc, that.LastErr, that.limit, that.Tx, + that.SlaveDB, that.Mode} tx, err := db.Begin() if err != nil { that.LastErr.SetError(err)