ImageRoomDataSource

class ImageRoomDataSource @Inject constructor(imageDAO: ImageDAO) : ImageDataSource

Implementation of ImageDataSource that utilizes Room Database for CRUD (Create, Read, Update, Delete) operations on Image data. This class also handles the association with AdministrativeUnitNames

It leverages dependency injection to receive an instance of ImageDAO for interacting with the database layer.

Constructors

Link copied to clipboard
@Inject
constructor(imageDAO: ImageDAO)

Functions

Link copied to clipboard
open suspend override fun create(image: Image)

Inserts a Image object into the database.

Link copied to clipboard
open suspend override fun delete()

Deletes images from database

Link copied to clipboard
open override fun retrieve(): Flow<List<Image>>

Retrieves a Flow of Lists containing all Image objects from the database.