aa
This commit is contained in:
@@ -263,6 +263,18 @@ func DeleteEntity(db *DaoDB, item interface{}, cols ...string) (num int64, err e
|
||||
return num, err
|
||||
}
|
||||
|
||||
func DeleteEntityTx(txDB orm.TxOrmer, item interface{}, cols ...string) (num int64, err error) {
|
||||
if txDB == nil {
|
||||
return
|
||||
}
|
||||
err = utils.CallFuncLogError(func() error {
|
||||
num, err = txDB.Delete(item, cols...)
|
||||
//num, err = db.Db.Delete(item, cols...)
|
||||
return err
|
||||
}, reflect.TypeOf(item).Name())
|
||||
return num, err
|
||||
}
|
||||
|
||||
func ExecuteSQL(db *DaoDB, sql string, params ...interface{}) (num int64, err error) {
|
||||
if db == nil {
|
||||
db = GetDB()
|
||||
|
||||
Reference in New Issue
Block a user