Insert all recipes in one query

This commit is contained in:
Kirill Kamakin
2022-11-13 13:17:55 +01:00
parent b7e8054d38
commit 946f34cb37
2 changed files with 5 additions and 11 deletions

View File

@@ -13,7 +13,7 @@ interface RecipeDao {
fun queryRecipesByPages(query: String): PagingSource<Int, RecipeSummaryEntity>
@Insert(onConflict = OnConflictStrategy.REPLACE)
suspend fun insertRecipe(recipeSummaryEntity: RecipeSummaryEntity)
suspend fun insertRecipes(recipeSummaryEntity: Iterable<RecipeSummaryEntity>)
@Query("DELETE FROM recipe_summaries")
suspend fun removeAllRecipes()