Created
September 14, 2018 23:13
-
-
Save PauloLinhares09/a2af348d1be3478882f0c836174c1f6e 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 TeamDao{ | |
@Query("SELECT * FROM Team ORDER BY id ASC") | |
fun getAllTeams() : List<Team> | |
@Query("SELECT * FROM Team WHERE Team.id = :myId") | |
fun getTeam(myId: Long) : Team | |
@Insert | |
fun insertTeam(team: Team) : Long | |
@Insert(onConflict = IGNORE) | |
fun insertOrReplaceTeams(vararg team: Team) | |
@Delete | |
fun deleteTeam(team: Team) | |
@Query("DELETE FROM Team") | |
fun deleteAllTeams() | |
@Update | |
fun updateTeam(team: Team) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment