diff --git a/src/main/scala/net/yoshinorin/qualtet/infrastructure/db/doobie/DoobieExecuter.scala b/src/main/scala/net/yoshinorin/qualtet/infrastructure/db/doobie/DoobieExecuter.scala index 4b4471ef..e44a448a 100644 --- a/src/main/scala/net/yoshinorin/qualtet/infrastructure/db/doobie/DoobieExecuter.scala +++ b/src/main/scala/net/yoshinorin/qualtet/infrastructure/db/doobie/DoobieExecuter.scala @@ -11,11 +11,6 @@ import doobie.free.connection.ConnectionIO class DoobieExecuter(tx: Transactor[IO]) extends Executer[ConnectionIO, IO] { - // NOTE: No-need ContextShift: https://typelevel.org/cats-effect/docs/migration-guide#contextshift - // implicit val cs: ContextShift[IO] = IO.contextShift(executionContexts) - // val executors: ExecutorService = Executors.newCachedThreadPool() - // val executionContexts: ExecutionContextExecutor = scala.concurrent.ExecutionContext.fromExecutor(executors) - override def perform[R](c: ContT[doobie.ConnectionIO, R, R]): ConnectionIO[R] = { c.run { x => x.pure[ConnectionIO] } } @@ -42,16 +37,4 @@ class DoobieExecuter(tx: Transactor[IO]) extends Executer[ConnectionIO, IO] { } yield r._8 } - /* - implicit final class PerformOps[R](action: Action[R]) { - def perform: ConnectionIO[R] = action match { - case continue: Continue[_, R, ConnectionIO] => continue.request.flatMap { t => continue.next(t).perform } - case done: Done[R] => done.value.pure[ConnectionIO] - } - } - - implicit final class TransactOps[T](connectionIO: ConnectionIO[T]) { - def andTransact: IO[T] = connectionIO.transact(transactor) - } - */ } diff --git a/src/main/scala/net/yoshinorin/qualtet/infrastructure/db/doobie/DoobieTransactor.scala b/src/main/scala/net/yoshinorin/qualtet/infrastructure/db/doobie/DoobieTransactor.scala index 226b3ffb..62cbabe7 100644 --- a/src/main/scala/net/yoshinorin/qualtet/infrastructure/db/doobie/DoobieTransactor.scala +++ b/src/main/scala/net/yoshinorin/qualtet/infrastructure/db/doobie/DoobieTransactor.scala @@ -13,22 +13,6 @@ trait DoobieTransactor[F[G[_], _]] { object DoobieTransactor { - /* - given DoobieTransactor: DoobieTransactor[Aux] = { - new DoobieTransactor[Aux] { - override def make(config: DBConfig): Transactor[IO] = { - Transactor.fromDriverManager[IO]( - driver = "org.mariadb.jdbc.Driver", - url = config.url, - user = config.user, - password = config.password, - logHandler = None - ) - } - } - } - */ - given DoobieTransactor: DoobieTransactor[Aux] = { new DoobieTransactor[Aux] { override def make(config: DBConfig): Resource[IO, HikariTransactor[IO]] = {