Guest User

Untitled

a guest
Oct 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. awsMySQL = {
  2. profile = "slick.jdbc.MySQLProfile$"
  3. dataSourceClass = "slick.jdbc.DatabaseUrlDataSource"
  4. properties = {
  5. url = "jdbc:mysql://vonohlendevsdefault.cn17tbad2awy.eu-central-1.rds.amazonaws.com"
  6. user = "foo"
  7. password = "bar"
  8. driver = com.mysql.cj.jdbc.Driver
  9. }
  10. connectionPool = disabled
  11. keepAliveConnection = true
  12. }
  13.  
  14. val db = Database.forConfig("awsMySQL")
  15.  
  16. val CustomersDAO = TableQuery[Customers]
  17. val q1 = for (c <- CustomersDAO) yield c.name
  18. val a = q1.result
  19. val f = db.run(a)
  20.  
  21. Await.result(f, Duration.Inf)
Add Comment
Please, Sign In to add comment