Skip to content

Commit

Permalink
1.修复使用db.Where("\"NUMBER\"")诸如重复加关键字符号导致的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
tobycroft committed Oct 30, 2023
1 parent ac316e9 commit 3e4fe93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builder_oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ func (b *BuilderOracle) BuildReplace(update, where string) (select_sql, on_sql,
if i > 0 {
on_sql += " and"
}
warr = append(warr, ws)
warr = append(warr, b.AddFieldQuotesOracle(ws))
on_sql += " t." + b.AddFieldQuotesOracle(ws) + "=" + "d." + b.AddFieldQuotesOracle(ws) + ""
}

fmt.Println(warr)
data1 := strings.Split(update, ",")
for i, data := range data1 {
data_kv := strings.Split(data, "=")
Expand All @@ -230,7 +230,7 @@ func (b *BuilderOracle) BuildReplace(update, where string) (select_sql, on_sql,
insert_keys += ","
insert_vals += ","
}
if !inArray(data_kv[0], warr) {
if !inArray(b.AddFieldQuotesOracle(data_kv[0]), warr) {
if len(warr) > 0 {
if update_sql != "" && i > 0 {
update_sql += ","
Expand Down

0 comments on commit 3e4fe93

Please sign in to comment.