HistoryDao: latestEntry can be null
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
parent
515ee1c2e1
commit
aaa99bd90d
2 changed files with 2 additions and 2 deletions
|
|
@ -9,5 +9,5 @@ package org.schabi.newpipe.database.history.dao
|
||||||
import org.schabi.newpipe.database.BasicDAO
|
import org.schabi.newpipe.database.BasicDAO
|
||||||
|
|
||||||
interface HistoryDAO<T> : BasicDAO<T> {
|
interface HistoryDAO<T> : BasicDAO<T> {
|
||||||
val latestEntry: T
|
val latestEntry: T?
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import org.schabi.newpipe.database.history.model.SearchHistoryEntry
|
||||||
interface SearchHistoryDAO : HistoryDAO<SearchHistoryEntry> {
|
interface SearchHistoryDAO : HistoryDAO<SearchHistoryEntry> {
|
||||||
|
|
||||||
@get:Query("SELECT * FROM search_history WHERE id = (SELECT MAX(id) FROM search_history)")
|
@get:Query("SELECT * FROM search_history WHERE id = (SELECT MAX(id) FROM search_history)")
|
||||||
override val latestEntry: SearchHistoryEntry
|
override val latestEntry: SearchHistoryEntry?
|
||||||
|
|
||||||
@Query("DELETE FROM search_history")
|
@Query("DELETE FROM search_history")
|
||||||
override fun deleteAll(): Int
|
override fun deleteAll(): Int
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue