Created
December 9, 2017 06:00
-
-
Save AkshayChordiya/7b57877e11038226c4b54c919e511ab2 to your computer and use it in GitHub Desktop.
User entity with single 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"))) | |
data class User( | |
@PrimaryKey(autoGenerate = true) | |
var id: Int = 0, | |
@ColumnInfo(name = "full_name") | |
var name: String = "" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment