Created
December 9, 2017 06:02
-
-
Save AkshayChordiya/b841dc0563b6365e93df25d2b6c1fc24 to your computer and use it in GitHub Desktop.
User entity with multiple index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity(tableName = "users", indices = arrayOf(Index("full_name"), Index("phone_number"))) | |
data class User( | |
@PrimaryKey(autoGenerate = true) | |
var id: Int = 0, | |
@ColumnInfo(name = "full_name") | |
var name: String = "", | |
@ColumnInfo(name = "phone_number") | |
var phoneNumber: String = "" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment