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 12, 2018
1 parent c53a033 commit 7bd8a3a
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 @@ -338,7 +338,7 @@ func (session *Session) innerInsert(bean interface{}) (int64, error) {
var sqlStr string
var tableName = session.statement.TableName()
if len(colPlaces) > 0 {
sqlStr = fmt.Sprintf("INSERT INTO %s (%v%v%v) VALUES (%v)",
sqlStr = fmt.Sprintf("INSERT IGNORE INTO %s (%v%v%v) VALUES (%v)",
session.engine.Quote(tableName),
session.engine.QuoteStr(),
strings.Join(colNames, session.engine.Quote(", ")),
Expand Down

0 comments on commit 7bd8a3a

Please sign in to comment.