Skip to content

Instantly share code, notes, and snippets.

Created Aug 16, 2021
What would you like to do?
Dao example
interface TodoDao : BaseDao<TodoEntity> {
@Query("SELECT * from todo")
suspend fun getAll(): Array<TodoEntity>
@Query("SELECT * from todo WHERE :uuid = uuid")
suspend fun getById(uuid: Long): TodoEntity?
@Query("DELETE from todo")
suspend fun deleteAll()
suspend fun TodoDao.replaceAll(vararg todos: TodoEntity) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment