Connect to HSQLDB database embedded in a Play application
I'm studying Play!. I'm using the HSQLDB embedded inside the framewok. It works fine for my needs, but I need to connect to it using a SQL client.
I tried with Squirrel SQL but I could not connect. I need to "see" the db and to operate on it using SQL statements outside my app.
I'm using the in memory database.
Do you have any information on how to connect with a sql client to the HSQLDB embedded in Play! ?
I hope you can give me 开发者_StackOverflow中文版some help.
If you are actually using Play 1.1, and therefore using HSQLDB, then it is possible, by using the following settings
According to this link, you should be able to do the following.
Driver: org.hsqldb.jdbcDriver
URL: jdbc:hs;qldb:mem:aname
user: "sa"
password: ""
I have got this working before, but I am away from my work PC, so can't confirm the exact settings.
However, I would suggest upgrading to Play 1.2. In this version of Play, it has change from HSQLDB to H2 and it comes with its own embedded SQL viewer, which you can access using the following URL.
http://localhost:9000/@db
This approach is far simpler!
精彩评论