Class SqlRunner


  • public class SqlRunner
    extends java.lang.Object
    Helper class to execute SQL scripts on a given connection. The script honors SQL comments and separately executes commands one after another.
    • Constructor Summary

      Constructors 
      Constructor Description
      SqlRunner()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void runScript​(java.sql.Connection connection, java.io.InputStream scriptInputStream)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • runScript

        public static void runScript​(java.sql.Connection connection,
                                     java.io.InputStream scriptInputStream)
                              throws java.sql.SQLException,
                                     java.io.IOException
        Throws:
        java.sql.SQLException
        java.io.IOException