views:

108

answers:

2

I want to know how can I do following things in scala?

  1. Connect to a postgreSQL database.
  2. Write SQL queries like SELECT , UPDATE etc. to modify a table in that database.

I know that in python I can do it using PygreSQL but how to do these things in scala?

+2  A: 

Take look at the tutorial "Using Scala with JDBC to connect to MySQL", replace the db url and add the right jdbc library.

Boris Pavlović
+1  A: 

We are using Squeryl, which is working well so far for us. Depending on your needs it may do the trick.

Here is a list of supported DB's and the adapters

Vonn