title: Run SQL script on JDBC connection, minimal approach
body: <p>Long story short: I want to run a SQL script on an HSQLDB database.</p>
  
  <p>I want to follow a minimalistic approach, which means: </p>
  
  <ul>
  <li><em>Absolutely no manual parsing of SQL</em></li>
  <li>No additional dependencies except for general Utilities. I make the distinction here because, for example I refuse to pull in Ibatis or Hibernate which are larger scope frameworks, but I will accept an apache commons or guava type utils library.</li>
  <li>The library MUST BE AVAILABLE ON MAVEN. No small-time pet-project stuff.</li>
  <li>(EDIT 12/5/15) Must have the ability to execute SQL file from classpath.</li>
  </ul>
  
  <p>To give you some context:</p>
  
  <pre><code>    try {
          connection = DriverManager.getConnection("jdbc:hsqldb:file:mydb", "sa", "");
          // Run script here
      } catch (SQLException e) {
          throw new RuntimeException("Unable to load database", e);
      }
  </code></pre>
  
  <p>A one-liner would be great. Something like:</p>
  
  <pre><code>    FancyUtils.runScript(connection, new File("myFile.sql"));
  </code></pre>
  
  <p>I did find <a href="https://fossies.org/dox/hsqldb-2.3.3/classorg_1_1hsqldb_1_1persist_1_1ScriptRunner.html" rel="nofollow">org.hsqldb.persist.ScriptRunner</a> but it takes a Database object as an argument and I can't seem to figure out how to get an instance. Also, I don't like the description of "Restores the state of a Database", so does that mean my database will be cleared first? That's definitely not what I want.</p>