Skip to content

Commit

Permalink
add ResetWhere for transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
fizzday committed Sep 7, 2018
1 parent 276962f commit 1562574
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions database.go
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,11 @@ func (dba *Database) Reset(source string) {
dba.min = ""
}

// ResetWhere : in transaction, when you need update several tables in difference condition
func (dba *Database) ResetWhere() {
dba.where = [][]interface{}{}
}

// JsonEncode : parse json
func (dba *Database) JsonEncode(data interface{}) string {
res, _ := utils.JsonEncode(data)
Expand Down

0 comments on commit 1562574

Please sign in to comment.