mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-22 20:33:05 +00:00
add some synchronous queries
This commit is contained in:
parent
180882203a
commit
9e12fb238c
1 changed files with 10 additions and 1 deletions
|
@ -13,8 +13,14 @@ interface EventDao{
|
|||
@Update
|
||||
fun updateEvent(vararg events: PersistentEvent)
|
||||
|
||||
@Delete
|
||||
fun deleteEvent(vararg event: PersistentEvent)
|
||||
|
||||
@Query("SELECT * FROM event")
|
||||
fun getAllEvents(): LiveData<PersistentEvent>
|
||||
fun getAllEvents(): LiveData<List<PersistentEvent>>
|
||||
|
||||
@Query("SELECT * FROM event")
|
||||
fun getAllEventsSync(): List<PersistentEvent>
|
||||
|
||||
@Query("SELECT * FROM event WHERE title LIKE :search ORDER BY title ASC")
|
||||
fun findEventByTitle(search: String): LiveData<PersistentEvent>
|
||||
|
@ -28,6 +34,9 @@ interface EventDao{
|
|||
@Query("SELECT * FROM event WHERE conferenceId = :id ORDER BY title ASC")
|
||||
fun findEventsByConference(id: Long):LiveData<List<PersistentEvent>>
|
||||
|
||||
@Query("SELECT * FROM event WHERE conferenceId = :id ORDER BY title ASC")
|
||||
fun findEventsByConferenceSync(id: Long):List<PersistentEvent>
|
||||
|
||||
@Query("SELECT * FROM event INNER JOIN watchlist_item WHERE event.eventId = watchlist_item.event_id")
|
||||
fun findBookmarkedEvents(): LiveData<List<PersistentEvent>>
|
||||
|
||||
|
|
Loading…
Reference in a new issue