UserDao

interface UserDao

The Data Access Object for the UserRoomEntity class.

Functions

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

Deletes a user from the local database.

Link copied to clipboard
abstract suspend fun getUserByEmail(email: String): UserRoomEntity

Retrieves a user from the local database by email.

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

Retrieves a user from the local database by remote ID.

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

Inserts a single user into the local database. If a conflict occurs, the existing user is replaced.

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

Inserts a list of users into the local database. If a conflict occurs, the existing users are replaced.

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

Updates a user in the local database.