Skip to content

Instantly share code, notes, and snippets.

@tobioyelekan
Created May 24, 2020 15:19
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 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