/tripkit/TripKitAndroidUI/com.skedgo.tripkit.ui.favorites.trips/FavoriteTripsDao

FavoriteTripsDao

\ interface FavoriteTripsDao

Functions

Name Summary
countFavoriteTripById abstract suspend fun countFavoriteTripById(tripGroupId: String): Boolean
countWaypointTripGroupsById abstract suspend fun countWaypointTripGroupsById(tripGroupId: String): Int
delete abstract suspend fun delete(favoriteTrip: FavoriteTripEntity)
getAll abstract fun getAll(): Flow<List<FavoriteTripEntity>>
Updated and removed suspend on all functions since getting error on the generated Java file. e.g. the getWaypointsByFavoriteTrip method is defined as an abstract method returning java.lang.Object. This is a typical pattern in Kotlin when using coroutines with Room. The method is expected to be a suspend function, returning a List, but due to the coroutine's Continuation parameter, it appears to the Java type system as returning an Object. When you call this method from Kotlin, it should behave as if it's returning a List. However, if you're trying to call it from Java, or expecting it to behave like a normal Java method, that could be causing confusion.
insert abstract fun insert(favoriteTrip: FavoriteTripEntity)
update abstract suspend fun update(favoriteTrip: FavoriteTripEntity)