Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
interface HistoryDao {
@Query("SELECT* FROM SearchHistory ORDER BY history DESC LIMIT 20")
fun selectRecentHistoryList(): LiveData<List<History>>
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insertHistory(history: History)
@Query("DELETE FROM SearchHistory WHERE search = :search")
fun deleteHistory(search: String)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment