Skip to content

Commit

Permalink
from INSERT to REPLACE
Browse files Browse the repository at this point in the history
  • Loading branch information
junqiang.zhang committed Feb 9, 2023
1 parent 59af578 commit 47b091b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/util_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (u *DBUtil) DumpFromRecordInfo(db *sql.DB, recorder map[string][]string) ma

}

sql := fmt.Sprintf("INSERT INTO `%v`(%v) VALUES(%v);", tableName, strings.Join(names, ","), strings.Join(values, ","))
sql := fmt.Sprintf("REPLACE INTO `%v`(%v) VALUES(%v);", tableName, strings.Join(names, ","), strings.Join(values, ","))
sqls = append(sqls, sql)

//result = append(result, row)
Expand Down

0 comments on commit 47b091b

Please sign in to comment.