ImageDAO

abstract class ImageDAO

The class that serves as an interface between the app and the database for CRUD operations (Create, Read, Update, Delete) and retrieval of Image data, potentially including related entities.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
abstract suspend fun deleteAll()

Delete all Images from Database

Link copied to clipboard
abstract suspend fun insert(geoLocationEntity: GeoLocationEntity): Long

Inserts a new GeoLocationEntity into the database.

abstract suspend fun insert(imageEntity: ImageEntity)

Inserts a new ImageEntity object into the database.

open suspend fun insert(image: Image)

Inserts an Image object into the database, including its associated geolocation. This method uses a transaction to ensure data consistency.

Link copied to clipboard
abstract suspend fun selectImageBy(latitude: Double, longitude: Double): ImageWithAdministrativeUnitNameAndGeoLocation?

Retrieves an Image object with its associated GeoLocation and AdministrativeUnitName, or null if no matching image is found.

Retrieves a Flow of Lists containing all Image objects with their associated GeoLocation and potentially their AdministrativeUnitName data.