Created
July 31, 2017 01:34
-
-
Save mwshubham/fea9634aa9bb6df53af6d9aa3b6fe5ba to your computer and use it in GitHub Desktop.
CategoryDao
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 | |
public interface CategoryDao { | |
@Query("SELECT * FROM " + AppDatabase.CATEGORY_TABLE_NAME) | |
List<CategoryData> getAll(); | |
@Insert(onConflict = OnConflictStrategy.REPLACE) | |
void insertAll(List<CategoryData> categories); | |
@Insert(onConflict = OnConflictStrategy.REPLACE) | |
void insert(CategoryData categoryData); | |
@Delete | |
void delete(CategoryData category); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment