Guest User

Untitled

a guest
Jul 15th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. trait DbService {
  2. private val connectionPool = bind[ConnectionPool]
  3. .onStart { dbConfig: DbConfig => newConnectionPool(dbConfig) }
  4. .onShutdown { _.close }
  5.  
  6. def query(sql:String) = { connectionPool.execute(sql) ... }
  7. }
Add Comment
Please, Sign In to add comment