Class SqlScriptUtils


  • public class SqlScriptUtils
    extends Object
    User: Dzmitry Stsiapanau Date: 8/21/14 Time: 3:38 PM
    • Constructor Detail

      • SqlScriptUtils

        public SqlScriptUtils()
    • Method Detail

      • execStatements

        public static boolean execStatements​(String script,
                                             Connection connection,
                                             boolean stopOnError)
        Execute a series of SQL statements, separated by ;

        We are already connected...

        Multiple statements have to be split into parts We use the ";" to separate statements...

        We keep the results in Result object from Jobs

        Parameters:
        script - The SQL script to be execute
        connection - connection to db
        Returns:
        A result with counts of the number or records updates, inserted, deleted or read.