I am making database app using room, mvvm, livedata
. I have Prepopulated it with some data. Now i have two options either i am going to show that prep
Please change your @Dao class like this
@Dao
abstract class SearchDao : BaseDao<SearchPojo> {
@Query("Select * from SearchPojo")
abstract fun allSearch(): LiveData<List<SearchPojo>>
@Query("Select * from SearchPojo where userName GLOB '*' || :userNameSearch|| '*'")
abstract fun searchViaID(userNameSearch: String) : LiveData<List<SearchPojo>>
@Insert
abstract override fun insert(searchPojo: SearchPojo)
}