I started to use Slick 3.0.0 and I like it's succinct syntax. Nevertheless, I wasn't able to find a way to use it in a database agnostic way.
In the following example provided in the documentation: http://slick.typesafe.com/doc/3.0.0/gettingstarted.html
I'd like to be able to decouple somehow this code of the database used and avoid importing database specific in my code (i.e slick.driver.H2Driver.api._
).
I tried to get rid of it by providing the connection using the cake pattern, but the ".result" member isn't available then.
A workaround would be to import slick.driver.JdbcDriver.api._
, but it is deprecated and thus should not be a good starting point.
Anyone found a way to use Slick 3.0.0 in a database agnostic and elegant way?
This question isn't far of "How to write database-agnostic Play application and perform first-time database initialization?", but that one focuses on Slick 3.0.0. Sadely the answers provided with that former question aren't targetting Slick 3.0.0 except one which uses deprecated code.