Created
December 23, 2018 00:06
-
-
Save vichu/f5b41332034210f7182cc57b59e749fa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
val userPair = for{ | |
uuid <- databaseService.createUser(UUID.nameUUIDFromBytes("Sumanth".getBytes), "Sumanth", "Kumar", "[email protected]") | |
userByFirstName <- databaseService.selectUserByFirstName("Sumanth") | |
userById <- databaseService.selectUserById(uuid.get) | |
} yield (userById, userByFirstName) | |
val res = userPair.map { | |
case (userById, userByFirstName) => | |
logger.info(s"User by Id : ${userById.get}") | |
logger.info(s"User by first name: ${userByFirstName.get}") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment