queryFromFavorites method

Future<FavoritesEntity?> queryFromFavorites(
  1. int entityKey
)

Used to query a specific song(entity) from favorites room.

Use checkIn to know if song exist on favorites room.

Parameters:

  • entityKey this is the key of the song that will be queried.

Return:

  • Will return a FavoritesEntity or a Null value.

See too:

Implementation

// Future<T> queryFrom<T>(int entityKey) async {
//   return _FavoritesDao().queryFromFavorites(entityKey) as T;
// }

//Query methods

//Favorites query

/// Used to query a specific song(entity) from [favorites] room.
///
/// Use [checkIn] to know if song exist on [favorites] room.
///
/// Parameters:
///
/// * [entityKey] this is the key of the song that will be queried.
///
/// Return:
///
/// * Will return a [FavoritesEntity] or a [Null] value.
///
/// See too:
///
/// * [addTo]
/// * [addAllTo]
/// * [deleteFrom]
/// * [deleteAllFrom]
Future<FavoritesEntity?> queryFromFavorites(int entityKey) async {
  return _FavoritesDao().queryFromFavorites(entityKey);
}