Last active
December 16, 2018 10:23
-
-
Save alediaferia/8dea96f3a72fa998e9d98e663837ea76 to your computer and use it in GitHub Desktop.
A very simple example DAO
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 PostDao { | |
@Query("SELECT * from posts") | |
fun getAll(): LiveData<List<Post>> | |
@Insert | |
fun insert(post: Post) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment