Created
February 27, 2019 04:49
-
-
Save charmygarg/12da81248d97eb5ab279beff9ad21864 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
def processUserAdded(addEvent: AddEvent): Future[Done] = { | |
session.withConnection { connection => | |
val statement = connection.prepareStatement("INSERT INTO user (orgId, email, name) VALUES (?, ?, ?)") | |
statement.setInt(1, addEvent.user.orgId) | |
statement.setString(2, addEvent.user.email) | |
statement.setString(3, addEvent.user.name) | |
statement.execute() | |
}.map(_ => Done) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment