CustomVehicleModelsRepository

Defines a repository to handle custom vehicle models that are saved in local database. The database is isolated from the one used in BeMapVehicleRepository.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun addVehicleModel(vehicleModel: VehicleModel)

Adds a VehicleModel to the database of this repository. Its primary key (id) will automatically be generated by Room.

Link copied to clipboard
abstract suspend fun deleteVehicleModel(id: String): Int

Deletes a VehicleModel from the database of this repository

Link copied to clipboard
abstract suspend fun getVehicleModel(id: String): VehicleModel?

Gets a VehicleModel from the database of this repository.

Link copied to clipboard
abstract suspend fun getVehicleModels(): Flow<List<VehicleModel>>

Gets all VehicleModel saved in the database of this repository.

Link copied to clipboard
abstract suspend fun updateVehicleModel(vehicleModel: VehicleModel): Int

Updates a VehicleModel from the database of this repository