UserDao

interface UserDao

Data Access Object for user-related database operations.

Functions

Link copied to clipboard
abstract suspend fun getAllConnectedUsers(): List<UserEntity>

Get all users with a non-null address (i.e., currently connected users).

Link copied to clipboard
abstract suspend fun getAllUsers(): List<UserEntity>

Get all users in the database.

Link copied to clipboard
abstract suspend fun getUserByIp(ip: String): UserEntity?

Get a user by their IP address.

Link copied to clipboard
abstract suspend fun getUserByUuid(uuid: String): UserEntity?

Get a user by their UUID.

Link copied to clipboard
abstract suspend fun hasWithID(uuid: String): Boolean

Check if a user with a given UUID exists.

Link copied to clipboard
abstract suspend fun insertUser(user: UserEntity)

Insert a new user into the database. Replaces existing entry if there is a conflict.

Link copied to clipboard
abstract suspend fun updateUser(user: UserEntity)

Update an existing user in the database.