Skip to content

Instantly share code, notes, and snippets.

Last active April 9, 2020 17:25
What would you like to do?
sealed trait DatabaseDriver {
// //A lot of database config we don't care about
// //Database object
lazy val db = new ConnectionPool(_, _)
trait PostgresDatabase extends Database with DatabaseDriver {
private def runQuery(query: String): IO[Throwable, QueryResult] = {
for {
result <- ZIO.fromFuture(_ => db.sendPreparedStatement(query))
} yield result
//Other Stuff :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment