Skip to content

Instantly share code, notes, and snippets.

@TKolbusz
Created June 14, 2017 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TKolbusz/b51e46fbc94c470bcdf5346731fcaac9 to your computer and use it in GitHub Desktop.
Save TKolbusz/b51e46fbc94c470bcdf5346731fcaac9 to your computer and use it in GitHub Desktop.
Controlling database flow using Room and RxJava2
@Entity(tableName = "items")
data class Item(
@PrimaryKey
@ColumnInfo(name = "name") var name: String = "",
@ColumnInfo(name = "place") var place: String = "",
@ColumnInfo(name = "quantity") var quantity: String = "",
@ColumnInfo(name = "description") var description: String = "",
@ColumnInfo(name = "tags") var tags: String = "",
@ColumnInfo(name = "date_added_ms") var dateMS: Long = Calendar.getInstance().timeInMillis
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment