Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

OnConflictStrategy

class OnConflictStrategy
androidx.room.OnConflictStrategy

Set of conflict handling strategies for various Dao methods.

Summary

Constants
static Int

OnConflict strategy constant to replace the old data and continue the transaction.

static Int

OnConflict strategy constant to rollback the transaction.

static Int

OnConflict strategy constant to abort the transaction.

static Int

OnConflict strategy constant to fail the transaction.

static Int

OnConflict strategy constant to ignore the conflict.

Public constructors

Set of conflict handling strategies for various Dao methods.

Constants

REPLACE

static val REPLACE: Int

OnConflict strategy constant to replace the old data and continue the transaction.

Value: 1

ROLLBACK

static val ROLLBACK: Int

OnConflict strategy constant to rollback the transaction.

Value: 2

ABORT

static val ABORT: Int

OnConflict strategy constant to abort the transaction. The transaction is rolled back.

Value: 3

FAIL

static val FAIL: Int

OnConflict strategy constant to fail the transaction.

Value: 4

IGNORE

static val IGNORE: Int

OnConflict strategy constant to ignore the conflict.

Value: 5

Public constructors

<init>

OnConflictStrategy()

Set of conflict handling strategies for various Dao methods.