Skip to content

Commit

Permalink
add IGNORE to INSERT
Browse files Browse the repository at this point in the history
  • Loading branch information
yongh committed Sep 11, 2018
1 parent 270035c commit c53a033
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion session_insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (session *Session) innerInsertMulti(rowsSlicePtr interface{}) (int64, error
session.engine.QuoteStr(),
strings.Join(colMultiPlaces, temp))
} else {
sql = fmt.Sprintf("INSERT INTO %s (%v%v%v) VALUES (%v)",
sql = fmt.Sprintf("INSERT IGNORE INTO %s (%v%v%v) VALUES (%v)",
session.engine.Quote(tableName),
session.engine.QuoteStr(),
strings.Join(colNames, session.engine.QuoteStr()+", "+session.engine.QuoteStr()),
Expand Down

0 comments on commit c53a033

Please sign in to comment.