Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait DbService {
- private val connectionPool = bind[ConnectionPool]
- .onStart { dbConfig: DbConfig => newConnectionPool(dbConfig) }
- .onShutdown { _.close }
- def query(sql:String) = { connectionPool.execute(sql) ... }
- }
Add Comment
Please, Sign In to add comment