Skip to content

Instantly share code, notes, and snippets.

@alediaferia
Last active December 16, 2018 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alediaferia/8dea96f3a72fa998e9d98e663837ea76 to your computer and use it in GitHub Desktop.
Save alediaferia/8dea96f3a72fa998e9d98e663837ea76 to your computer and use it in GitHub Desktop.
A very simple example DAO
@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