Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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