Rollback

@Insert(onConflict = OnConflictStrategy.ROLLBACK)
@Update(onConflict = OnConflictStrategy.ROLLBACK)

What SQLite Does

This strategy maps to INSERT OR ROLLBACK or UPDATE OR ROLLBACK statements.

It rolls back the transaction, as you might expect given the name.

Effects in Room

As with FAIL, while Room used to support OnConflictStrategy.ROLLBACK, it is now deprecated. Google recommends that you use ABORT instead.


Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.