I am looking for a Scala Database library which allows me to use SQL to talk to Databases with Connection pooling and preferably multiple end points (master and slave) taken care of.
The Scala ORM/DSL tools look too complicated and have a higher learning curve without much value addition for my use case. So I am looking for a simpler library which allows me write SQL directly.
But the connection pooling is a must for the library.
Any suggestions for the above?.
Using JDBC in scala is pretty much seamless. In my case, I wrote a small reusable db library for bridging JDBC to Scala (i.e., generate SQL from Scala objects and generate scala objects from results).
For pooling, you could use a 3rd party db pool library (such as http://www.snaq.net/java/DBPool/) Using all this in Scala (once your library is done) requires very few lines of code.
I prefer SQueryL as it has semantics like Scala Collections but accesses the database, this means that operations which usually use Scala collections can work more easily with its abstractions. http://squeryl.org/
Doesn'T ScalaQuery work for you? http://scalaquery.org/
If you prefer SQL over ORM you definitely should check O/R Broker JDBC library. Unfortunately I'm not sure if it supports connection pooling or not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With