<Validating data from a database> I am trying to c...
# stackoverflow
u
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...