Skip to content

Instantly share code, notes, and snippets.

@charmygarg
Last active February 27, 2019 04:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charmygarg/4c3d108a53beb16ddec0fe4f77d0516f to your computer and use it in GitHub Desktop.
Save charmygarg/4c3d108a53beb16ddec0fe4f77d0516f to your computer and use it in GitHub Desktop.
def createTable: Future[Done] = { val query =
"""
|CREATE TABLE IF NOT EXISTS user (
|orgId INT NOT NULL,
|email VARCHAR(64) NOT NULL,
|name VARCHAR(64) NOT NULL,
|PRIMARY KEY (orgId))
""".stripMargin
session.withConnection(_.prepareStatement(query).execute()).map(_ => Done)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment