populating in memory hsqldb database from script

跟風遠走 提交于 2019-12-06 06:00:55

问题


Is there a way that I can specify a script in the connection string pointing to my in memory hsqldb instance?

I was looking at this article and it looks like it is possible, but I'm not sure how to formulate the string correctly or where to put the script file. Looking at the hsqldb documentation here it doesn't appear to be the case.

What would my options here be for using this from java tests?

This is related to a previous hsqldb question here starting and stopping hsqldb from unit tests


回答1:


Use a file: database instead of mem:, but include "files_readonly=true" in the properties file. Changes to the database during tests will not be persisted.



来源:https://stackoverflow.com/questions/3025309/populating-in-memory-hsqldb-database-from-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!