From 7e6ff9222e52603303ae1ea1aa78caab83ea2d82 Mon Sep 17 00:00:00 2001 From: Naftoli Gugenheim <98384+nafg@users.noreply.github.com> Date: Sun, 26 May 2024 04:59:28 -0400 Subject: [PATCH] Remove TypedSQL as tsql was removed --- src/main/scala/TypedSQL.scala | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/main/scala/TypedSQL.scala diff --git a/src/main/scala/TypedSQL.scala b/src/main/scala/TypedSQL.scala deleted file mode 100644 index 509bf78..0000000 --- a/src/main/scala/TypedSQL.scala +++ /dev/null @@ -1,28 +0,0 @@ -import slick.driver.JdbcProfile - -import scala.concurrent.{Future, Await} -import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent.duration.Duration -import slick.backend.{DatabaseConfig, StaticDatabaseConfig} - -@StaticDatabaseConfig("#tsql") -object TypedSQL extends App { - val dc = DatabaseConfig.forAnnotation[JdbcProfile] - import dc.driver.api._ - - def getSuppliers(id: Int): DBIO[Seq[(Int, String, String, String, String, String)]] = - tsql"select * from suppliers where id > $id" - - val db = dc.db - try { - - val a: DBIO[Unit] = - getSuppliers(50).map { s => - println("All suppliers > 50:") - s.foreach(println) - } - - val f: Future[Unit] = db.run(a) - Await.result(f, Duration.Inf) - } finally db.close -}