Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Dao
- interface ConcertDao {
- // The Int type parameter tells Room to use a PositionalDataSource
- // object, with position-based loading under the hood.
- @Query("SELECT * FROM Concerts ORDER BY date DESC")
- fun concertsByDate(): DataSource.Factory<Int, Concert>
- }
- data class Concert(val date: Long, val bands: List<Band>)
- @Table(name = "Concerts")
- class YakTimelineEventAA(): YakModelAA(){
- @Column(name = "Bands")
- var bands: String? = null
- @Column(name = "Date", index = true)
- var date: Long? = null
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement