@ -13,10 +13,10 @@ interface RssSourceDao {
@get:Query("SELECT * FROM rssSources")
val all: List<RssSource>
@Query("SELECT * FROM rssSources")
@Query("SELECT * FROM rssSources order by customOrder")
fun liveAll(): LiveData<List<RssSource>>
@Query("SELECT * FROM rssSources where sourceName like :key or sourceUrl like :key or sourceGroup like :key")
@Query("SELECT * FROM rssSources where sourceName like :key or sourceUrl like :key or sourceGroup like :key order by customOrder")
fun liveSearch(key: String): LiveData<List<RssSource>>
@Query("SELECT * FROM rssSources where enabled = 1")
@ -2,11 +2,12 @@ package io.legado.app.data.entities
import android.os.Parcelable
import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey
import kotlinx.android.parcel.Parcelize
@Parcelize
@Entity(tableName = "rssSources")
@Entity(tableName = "rssSources", indices = [(Index(value = ["sourceUrl"], unique = false))])
data class RssSource(
@PrimaryKey
var sourceUrl: String = "",