HSQL Create Procedure Syntax doesn't seem to match the documentation

你离开我真会死。 提交于 2019-12-01 08:14:26

The way I resolved this was with the following:

    <jdbc:initialize-database data-source="dataSource" ignore-failures="DROPS">
    <jdbc:script location="file:Artifacts/Hsql Version Scripts/install/droptables.sql" separator=";"/>
    <jdbc:script location="file:Artifacts/Hsql Version Scripts/install/install.sql" separator="/;"/>
    <jdbc:script location="file:Artifacts/Hsql Version Scripts/patchset/1.0.0.02.create_survey_tables.sql"
                 separator="/;"/>
    <jdbc:script location="file:Artifacts/Hsql Version Scripts/patchset/1.00.01.update.sql" separator=";"/>
    <jdbc:script location="file:Artifacts/Hsql Version Scripts/patchset/1.00.03.insert_surveyQA2.sql"
                 separator=";"/>
    <jdbc:script location="file:Artifacts/Hsql Version Scripts/patchset/1.00.05.insert_surveyQA4.sql"
                 separator=";"/>
</jdbc:initialize-database>

I can specify the delimiter in the script files. So I used a different delimiter /; in the script files that had create procedure statements that had ; separated commands.

1. Terminate each of the SQL statements (insert, create, select etc)
    within the script (some_script.sql) with /;

2. Whilst configuring in Spring - add the following:

   return new EmbeddedDatabaseBuilder()
    .setType("HSQL")
    .setName("DBNAME")
    .addScript("some_script.sql")
    .setSeparator("/;")
    .build();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!