mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-23 12:53:08 +00:00
return ConferenceGroups ordered by order_index
This commit is contained in:
parent
44c0564f81
commit
8b5954f156
2 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
package de.nicidienase.chaosflix.common.entities.recording.persistence
|
||||
|
||||
import android.arch.persistence.room.ColumnInfo
|
||||
import android.arch.persistence.room.Entity
|
||||
import android.arch.persistence.room.Index
|
||||
import android.arch.persistence.room.PrimaryKey
|
||||
|
@ -12,6 +13,7 @@ class ConferenceGroup(
|
|||
): Parcelable {
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
var conferenceGroupId: Long = 0
|
||||
@ColumnInfo(name = "order_index")
|
||||
var index: Int = 1_000_000
|
||||
|
||||
constructor(parcel: Parcel) : this(parcel.readString()) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import io.reactivex.Flowable
|
|||
|
||||
@Dao
|
||||
interface ConferenceGroupDao{
|
||||
@Query("SELECT * FROM conference_group")
|
||||
@Query("SELECT * FROM conference_group ORDER BY order_index")
|
||||
fun getAll(): Flowable<List<ConferenceGroup>>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.IGNORE)
|
||||
|
|
Loading…
Reference in a new issue