diff --git a/database/db.go b/database/db.go index a431455..32b4f6f 100644 --- a/database/db.go +++ b/database/db.go @@ -313,6 +313,8 @@ func (db *DB) BuildInsertIgnoreStmt(into interface{}) (string, int) { } clause = fmt.Sprintf("ON CONFLICT ON CONSTRAINT %s DO NOTHING", constraint) + case SQLite: + clause = "ON CONFLICT DO NOTHING" } return fmt.Sprintf( @@ -384,6 +386,9 @@ func (db *DB) BuildUpsertStmt(subject interface{}) (stmt string, placeholders in clause = fmt.Sprintf("ON CONFLICT ON CONSTRAINT %s DO UPDATE SET", constraint) setFormat = `"%[1]s" = EXCLUDED."%[1]s"` + case SQLite: + clause = "ON CONFLICT DO UPDATE SET" + setFormat = `"%[1]s" = EXCLUDED."%[1]s"` } set := make([]string, 0, len(updateColumns))