Guest User

Untitled

a guest
Aug 11th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. Play Scala: How to access multiple databases with anorm and Magic[T]
  2. db_other.url=jdbc:mysql://localhost/test
  3. db_other.driver=com.mysql.jdbc.Driver
  4. db_other.user=root
  5. db_other.pass=
  6.  
  7. var sqlQuery = SQL( //I guess some config params should be set here, but how?
  8. """
  9. select * from Country
  10. """
  11. )
  12.  
  13. # play.api.db.DB.class
  14.  
  15. def withConnection[A](name : scala.Predef.String)(block : scala.Function1[java.sql.Connection, A])(implicit app : play.api.Application) : A = { /* compiled code */ }
Add Comment
Please, Sign In to add comment