Skip to content

Instantly share code, notes, and snippets.

@tobioyelekan
Created May 24, 2020 15:19
Show Gist options
  • Save tobioyelekan/e0b3309ef7699866711430858e287589 to your computer and use it in GitHub Desktop.
Save tobioyelekan/e0b3309ef7699866711430858e287589 to your computer and use it in GitHub Desktop.
@Dao
interface UserDao {
@Query("SELECT * FROM user")
fun getUsers(): LiveData<List<User>>
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun saveUsers(user: User)
@Query("DELETE FROM user")
fun deleteAll()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment