UserDao

interface UserDao

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

Functions

Link copied to clipboard
abstract suspend fun delete(user: UserRoomEntity)

Deletes a user entity from the database.

Link copied to clipboard
abstract suspend fun getUserById(id: Int): UserRoomEntity
Link copied to clipboard
abstract suspend fun getUserByRemoteId(remoteId: Int): UserRoomEntity

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

Link copied to clipboard
abstract fun getUserFlowByRemoteId(remoteId: Int): Flow<UserRoomEntity>
Link copied to clipboard

Retrieves a list of user entities along with associated planet entities from the database.

Link copied to clipboard
abstract suspend fun insert(user: UserRoomEntity)

Inserts a single user entity into the database. If a conflict arises, the existing entry is replaced.

Link copied to clipboard
abstract suspend fun insertAll(users: List<UserRoomEntity>)

Inserts a list of user entities into the database. If a conflict arises, the existing entries are replaced.

Link copied to clipboard
abstract suspend fun update(user: UserRoomEntity)

Updates an existing user entity in the database.