https://kotlinlang.org logo
Title
u

user

07/02/2022, 8:51 AM
Validating data from a database I am trying to create a registration screen. When the registration button is pressed, I want the program to check if the provided username already exists in the database. Is it does, it will not proceed with the registration. Problem is, I cannot, find a way to access the data. Here's the related code '''@Database(entities = arrayOf(User::class), version = 1) abstract class UsersDatabase : RoomDatabase() { abstract fun usersDao(): UsersDao companion object { @Volatile private var...