Skip to content

Instantly share code, notes, and snippets.

@Farhandroid
Created February 16, 2022 02:26
Show Gist options
  • Save Farhandroid/47ef113f4716d67f75a4c329be425ddd to your computer and use it in GitHub Desktop.
Save Farhandroid/47ef113f4716d67f75a4c329be425ddd to your computer and use it in GitHub Desktop.
MovieRemoteKeysDao
@Dao
interface MovieRemoteKeysDao {
@Query("SELECT * FROM movie_remote_keys WHERE id = :movieId")
suspend fun getMovieRemoteKeys(movieId: Int): MovieRemoteKeys?
@Insert(onConflict = OnConflictStrategy.REPLACE)
suspend fun addAllMovieRemoteKeys(movieRemoteKeys : List<MovieRemoteKeys>)
@Query("DELETE FROM movie_remote_keys")
suspend fun deleteAllMovieRemoteKeys()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment