how to insert only unique data room android code example
Example: how to insert only unique data room android
@Entity(tableName = "chat_message_table", indices = @Index(value = {"messageId"}, unique = true))
public class Message {
...
}
@Entity(tableName = "chat_message_table", indices = @Index(value = {"messageId"}, unique = true))
public class Message {
...
}