RecipeDao

interface RecipeDao

Data Access Object (DAO) for the "recipes" table in the database.

This interface provides methods to perform operations on the "recipes" table.

Functions

Link copied to clipboard
abstract suspend fun delete(item: dbRecipe)

Deletes a recipe from the "recipes" table.

Link copied to clipboard
abstract fun getAllItems(): Flow<List<dbRecipe>>

Retrieves all recipes from the "recipes" table, ordered by title in ascending order.

Link copied to clipboard
abstract fun getItem(id: Long): Flow<dbRecipe>

Retrieves a recipe from the "recipes" table by its local ID.

Link copied to clipboard
abstract suspend fun insert(item: dbRecipe)

Inserts a new recipe into the "recipes" table. If a recipe with the same primary key already exists, it will be replaced.

Link copied to clipboard
abstract suspend fun update(item: dbRecipe)

Updates an existing recipe in the "recipes" table.