We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e45b33 commit 548aeddCopy full SHA for 548aedd
database/db.go
@@ -313,6 +313,8 @@ func (db *DB) BuildInsertIgnoreStmt(into interface{}) (string, int) {
313
}
314
315
clause = fmt.Sprintf("ON CONFLICT ON CONSTRAINT %s DO NOTHING", constraint)
316
+ case SQLite:
317
+ clause = "ON CONFLICT DO NOTHING"
318
319
320
return fmt.Sprintf(
@@ -384,6 +386,9 @@ func (db *DB) BuildUpsertStmt(subject interface{}) (stmt string, placeholders in
384
386
385
387
clause = fmt.Sprintf("ON CONFLICT ON CONSTRAINT %s DO UPDATE SET", constraint)
388
setFormat = `"%[1]s" = EXCLUDED."%[1]s"`
389
390
+ clause = "ON CONFLICT DO UPDATE SET"
391
+ setFormat = `"%[1]s" = EXCLUDED."%[1]s"`
392
393
394
set := make([]string, 0, len(updateColumns))
0 commit comments