Last active
November 26, 2017 05:12
-
-
Save tolmachevroman/673ea92d3981c5de1a64ccf17afe0320 to your computer and use it in GitHub Desktop.
Medium Post 1. RestaurantsDao
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 RestaurantsDao { | |
@Query("SELECT * FROM restaurant") | |
fun queryRestaurants(): LiveData<List<Restaurant>> | |
@Query("SELECT * FROM restaurant WHERE cuisine LIKE :cuisine") | |
fun queryRestaurantsByCuisine(cuisine: Int): LiveData<List<Restaurant>> | |
@Insert(onConflict = REPLACE) | |
fun insertRestaurant(restaurant: Restaurant) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment