Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Dao
- interface RecordDatabaseDao {
- @Insert
- fun insert(record: RecordingItem)
- @Update
- fun update(record: RecordingItem)
- @Query("SELECT * from sound_recording_table WHERE id = :key")
- fun getRecord(key: Int): RecordingItem?
- @Query("DELETE FROM sound_recording_table")
- fun clearAll()
- @Query("DELETE FROM sound_recording_table WHERE id = :key")
- fun removeRecord(key: Long)
- @Query("SELECT * FROM sound_recording_table ORDER BY id DESC")
- fun getAllRecords(): LiveData<List<RecordingItem>>
- @Query("SELECT COUNT(*) FROM sound_recording_table")
- fun getCount(): LiveData<Int>
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement