Skip to content

Instantly share code, notes, and snippets.

@manijshrestha
Created June 3, 2017 04:34
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 manijshrestha/a3310dcf8e9fcc8aaa171c756dab52f8 to your computer and use it in GitHub Desktop.
Save manijshrestha/a3310dcf8e9fcc8aaa171c756dab52f8 to your computer and use it in GitHub Desktop.
@Dao interface TaskDao {
@Query("select * from task")
fun getAllTasks(): List<Task>
@Query("select * from task where id = :p0")
fun findTaskById(id: Long): Task
@Insert(onConflict = REPLACE)
fun insertTask(task: Task)
@Update(onConflict = REPLACE)
fun updateTask(task: Task)
@Delete
fun deleteTask(task: Task)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment