RouteDao

interface RouteDao

Functions

Link copied to clipboard
abstract suspend fun addMarkerToRoute(crossRef: RouteMarkerCrossRef)
Link copied to clipboard
Link copied to clipboard
abstract fun getAllMarkersFlow(): Flow<List<MarkerEntity>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun getMarkerById(markerId: Long): MarkerEntity?
Link copied to clipboard
abstract fun getMarkerByLocation(longitude: Double, latitude: Double): MarkerEntity?
Link copied to clipboard
Link copied to clipboard
abstract fun getRouteById(routeId: Long): RouteEntity?
Link copied to clipboard
Link copied to clipboard
abstract suspend fun insertMarker(marker: MarkerEntity): Long
Link copied to clipboard
abstract suspend fun insertRoute(route: RouteEntity): Long
Link copied to clipboard
open suspend fun insertRouteWithExistingMarkers(route: RouteEntity, markers: List<MarkerEntity>): Long

insertRouteWithExistingMarkers is used from the app to create a route using markers which are already in the database.

Link copied to clipboard
open suspend fun insertRouteWithNewMarkers(route: RouteEntity, markers: List<MarkerEntity>): Long

insertRouteWithNewMarkers is used from test code and creates a route AND all of the markers within it.

Link copied to clipboard
abstract suspend fun removeMarker(markerId: Long)
Link copied to clipboard
abstract suspend fun removeMarkerFromRoute(routeId: Long, markerId: Long)
Link copied to clipboard
abstract suspend fun removeMarkersForRoute(routeId: Long)
Link copied to clipboard
abstract suspend fun removeRoute(routeId: Long)
Link copied to clipboard
abstract suspend fun updateMarker(marker: MarkerEntity)