Created
May 23, 2020 09:51
-
-
Save deepanshu42/ceeaa5086b9a53faa3bfd1206804f68a to your computer and use it in GitHub Desktop.
Room with Kotlin Coroutines Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Dao | |
interface UserDao { | |
@Insert(onConflict = OnConflictStrategy.REPLACE) | |
suspend fun insertUsers(vararg users: User) | |
@Update | |
suspend fun updateUsers(vararg users: User) | |
@Delete | |
suspend fun deleteUsers(vararg users: User) | |
@Query("SELECT * FROM users") | |
suspend fun loadAllUsers(): Array<User> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment