Created
July 13, 2020 14:05
-
-
Save sberoch/444ae418de78f316a3758982d0e2c1b2 to your computer and use it in GitHub Desktop.
This file contains 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 CharacterDao { | |
@Query("SELECT * FROM characters") | |
fun getAllCharacters() : LiveData<List<Character>> | |
@Query("SELECT * FROM characters WHERE id = :id") | |
fun getCharacter(id: Int): LiveData<Character> | |
@Insert(onConflict = OnConflictStrategy.REPLACE) | |
suspend fun insertAll(characters: List<Character>) | |
@Insert(onConflict = OnConflictStrategy.REPLACE) | |
suspend fun insert(character: Character) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment