You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey guys, is there any way to select only one record with kotlin exposed? Currently I'm using below code to select a user from DB, but is there any function like selectSingle() to get an object (not list) ?
fun getUser(userId: Int): User? {
var user: User? = null
transaction {
user = UserTable.select { UserTable.id eq userId }.limit(1).map { User.fromRow(it) }[0]
}
return user
}
It is not duplicate issue , I have not found any solution in issues
The text was updated successfully, but these errors were encountered:
Hey guys, is there any way to select only one record with kotlin exposed? Currently I'm using below code to select a user from DB, but is there any function like selectSingle() to get an object (not list) ?
It is not duplicate issue , I have not found any solution in issues
The text was updated successfully, but these errors were encountered: