Skip to content

Instantly share code, notes, and snippets.

@manijshrestha
Created June 3, 2017 04:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
@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