OnConflictStrategy

public abstract @interface OnConflictStrategy
implements Annotation

androidx.room.OnConflictStrategy


Set of conflict handling strategies for various Dao methods.

Check SQLite conflict documentation for details.

Summary

Constants

int ABORT

OnConflict strategy constant to abort the transaction.

int FAIL

OnConflict strategy constant to fail the transaction.

int IGNORE

OnConflict strategy constant to ignore the conflict.

int REPLACE

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

int ROLLBACK

OnConflict strategy constant to rollback the transaction.

Inherited methods

Constants

ABORT

public static final int ABORT

OnConflict strategy constant to abort the transaction.

Constant Value: 3 (0x00000003)

FAIL

public static final int FAIL

OnConflict strategy constant to fail the transaction.

Constant Value: 4 (0x00000004)

IGNORE

public static final int IGNORE

OnConflict strategy constant to ignore the conflict.

Constant Value: 5 (0x00000005)

REPLACE

public static final int REPLACE

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

Constant Value: 1 (0x00000001)

ROLLBACK

public static final int ROLLBACK

OnConflict strategy constant to rollback the transaction.

Constant Value: 2 (0x00000002)