mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-26 22:20:24 +00:00
add delete querys for conferences, events and recordings
This commit is contained in:
parent
d9b70abfac
commit
acf73efa2f
3 changed files with 9 additions and 4 deletions
|
@ -1,10 +1,7 @@
|
|||
package de.nicidienase.chaosflix.common.entities.recording.persistence
|
||||
|
||||
import android.arch.lifecycle.LiveData
|
||||
import android.arch.persistence.room.Dao
|
||||
import android.arch.persistence.room.Insert
|
||||
import android.arch.persistence.room.OnConflictStrategy
|
||||
import android.arch.persistence.room.Query
|
||||
import android.arch.persistence.room.*
|
||||
|
||||
@Dao
|
||||
interface ConferenceDao{
|
||||
|
@ -22,4 +19,7 @@ interface ConferenceDao{
|
|||
|
||||
@Query("SELECT * FROM conference WHERE conferenceGroupId = :id ORDER BY acronym DESC")
|
||||
fun findConferenceByGroup(id: Long): LiveData<List<PersistentConference>>
|
||||
|
||||
@Delete
|
||||
fun deleteConference(vararg conference: PersistentConference)
|
||||
}
|
||||
|
|
|
@ -37,4 +37,6 @@ interface EventDao{
|
|||
@Query("SELECT * FROM event WHERE frontendLink = :url ")
|
||||
fun findEventsByFrontendurl(url: String):LiveData<PersistentEvent>
|
||||
|
||||
@Query("DELETE FROM event WHERE conferenceId = :conferenceId")
|
||||
fun deleteEventsForConference(conferenceId: Long)
|
||||
}
|
|
@ -19,4 +19,7 @@ interface RecordingDao{
|
|||
|
||||
@Query("SELECT * FROM recording WHERE eventId = :id")
|
||||
fun findRecordingByEvent(id: Long): LiveData<List<PersistentRecording>>
|
||||
|
||||
@Query("DELETE FROM recording WHERE eventId = :eventId")
|
||||
fun deleteRecordingsForEvent(eventId: Long)
|
||||
}
|
Loading…
Reference in a new issue