Created
February 11, 2019 17:59
-
-
Save pjagielski/9b9d3c33b23f19460805b40b044e7b66 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UserTable.select { UserTable.username eq username }?.toUser() | |
// or | |
UserTable.select { UserTable.username like username }.map { it.toUser() } | |
fun ResultRow.toUser() = User( | |
username = this[UserTable.username], | |
email = this[UserTable.email], | |
password = this[UserTable.password] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment