PlanetDao

interface PlanetDao

Data Access Object (DAO) for interacting with the local database regarding PlanetRoomEntity. Defines methods to perform CRUD (Create, Read, Update, Delete) operations on planet entities.

Functions

Link copied to clipboard
abstract suspend fun delete(planet: PlanetRoomEntity)

Deletes a planet entity from the database.

Link copied to clipboard
abstract suspend fun getPlanetByRemoteId(remoteId: Int): PlanetRoomEntity

Retrieves a planet entity by its remote identifier from the database.

Link copied to clipboard
abstract suspend fun getPlanetsByOwnerId(ownerId: Int): List<PlanetRoomEntity>
Link copied to clipboard
abstract fun getPlanetsFlowByOwnerId(ownerId: Int): Flow<List<PlanetRoomEntity>>

Retrieves all planet entities associated with a user's remote identifier from the database.

Link copied to clipboard
abstract suspend fun insert(planet: PlanetRoomEntity)

Inserts a single planet entity into the database. If a conflict arises, the operation is ignored.

Link copied to clipboard
abstract suspend fun insertAll(planets: List<PlanetRoomEntity>)

Inserts a list of planet entities into the database. If a conflict arises, the operation is ignored.

Link copied to clipboard
abstract suspend fun removeAllByOwnerId(ownerId: Int)

Removes all planet entities associated with a user's remote identifier from the database.

Link copied to clipboard
abstract suspend fun update(planet: PlanetRoomEntity)

Updates an existing planet entity in the database.