Skip to content

Instantly share code, notes, and snippets.

@mwshubham
Created July 31, 2017 01:34
Show Gist options
  • Save mwshubham/fea9634aa9bb6df53af6d9aa3b6fe5ba to your computer and use it in GitHub Desktop.
Save mwshubham/fea9634aa9bb6df53af6d9aa3b6fe5ba to your computer and use it in GitHub Desktop.
CategoryDao
@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