core / com.vmadalin.core.database.characterfavorite / CharacterFavoriteDao

CharacterFavoriteDao

interface CharacterFavoriteDao

The data access object for the CharacterFavorite class.

See Also

Dao

Functions

deleteAllCharactersFavorite

Delete all database favorite characters.

abstract suspend fun deleteAllCharactersFavorite(): Unit

deleteCharacterFavorite

Delete database favorite character.

abstract suspend fun deleteCharacterFavorite(character: CharacterFavorite): Unit

deleteCharacterFavoriteById

Delete database favorite character by identifier.

abstract suspend fun deleteCharacterFavoriteById(characterFavoriteId: Long): Unit

getAllCharactersFavorite

Obtain all database added favorite characters ordering by name field.

abstract suspend fun getAllCharactersFavorite(): List<CharacterFavorite>

getAllCharactersFavoriteLiveData

Obtain all database added favorite characters ordering by name field.

abstract fun getAllCharactersFavoriteLiveData(): LiveData<List<CharacterFavorite>>

getCharacterFavorite

Obtain database favorite character by identifier.

abstract suspend fun getCharacterFavorite(characterFavoriteId: Long): CharacterFavorite?

insertCharacterFavorite

Add to database a favorite character.

abstract suspend fun insertCharacterFavorite(character: CharacterFavorite): Unit

insertCharactersFavorites

Add to database a list of favorite characters.

abstract suspend fun insertCharactersFavorites(characters: List<CharacterFavorite>): Unit