square / sqlbrite

A lightweight wrapper around SQLiteOpenHelper which introduces reactive stream semantics to SQL operations.
https://square.github.io/sqlbrite/3.x/sqlbrite/
Apache License 2.0
4.57k stars 416 forks source link

Rollback instead of Replace #245

Closed Shahroz16 closed 6 years ago

Shahroz16 commented 6 years ago

Whenever I call,

db.insert("table name", OnConflictStrategy.REPLACE, params)

In the logs, I see

D/SQL Database: INSERT table: //table name values: // params values conflictAlgorithm: rollback

Is this, conflictAlgorithm: rollback intended?

JakeWharton commented 6 years ago

OnConflictStrategy.REPLACE comes from Room. You should be using SQLiteDatabase.CONFLICT_REPLACE.