I'm trying to set up Slick as our DAO layer in our Play application. I have the following:
In my application.conf:
dbConfig {
url = "jdbc:postgresql://localhost:5432/test"
dataSourceClass = "org.postgresql.ds.PGConnectionPoolDataSource"
properties = {
databaseName = "mydb"
user = "myuser"
password = "secret"
}
numThreads = 10
}
Should I use PGSimpleDataSource instead of the PGConnectionPoolDataSource?
The documentation from Slick is not sufficient enough and it only confuses me.
The next question is, what is that I get from doing
Database.fromConfig("dbConfig")
is a Database which is of type DatabaseDef. Do I have to ask or create a session every time when I want to do some read, write in my tables?
Where did I say that I should use HikariCP as my connection pool implementation?
Play
do you use? – Mon Calamari