Skip to content

Instantly share code, notes, and snippets.

@robertlevonyan
Created March 3, 2021 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertlevonyan/c42eb1f679628cae64129151d19d7ba6 to your computer and use it in GitHub Desktop.
Save robertlevonyan/c42eb1f679628cae64129151d19d7ba6 to your computer and use it in GitHub Desktop.
@Dao
interface MovieDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
suspend fun saveMovies(vararg movies: RoomMovie)
@Query("SELECT * FROM RoomMovie")
fun getMovies(): Flow<List<RoomMovie>>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment