Package it.unibz.inf.ontop.utils
Class SQLScriptRunner
- java.lang.Object
-
- it.unibz.inf.ontop.utils.SQLScriptRunner
-
public class SQLScriptRunner extends Object
Tool to run database scripts
-
-
Constructor Summary
Constructors Constructor Description SQLScriptRunner(Connection connection, boolean autoCommit, boolean stopOnError)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrunScript(Reader reader)Runs an SQL script (read in using the Reader parameter)voidsetDelimiter(String delimiter, boolean fullLineDelimiter)voidsetErrorLogWriter(PrintWriter errorLogWriter)Setter for errorLogWriter propertyvoidsetLogWriter(PrintWriter logWriter)Setter for logWriter property
-
-
-
Constructor Detail
-
SQLScriptRunner
public SQLScriptRunner(Connection connection, boolean autoCommit, boolean stopOnError)
Default constructor
-
-
Method Detail
-
setDelimiter
public void setDelimiter(String delimiter, boolean fullLineDelimiter)
-
setLogWriter
public void setLogWriter(PrintWriter logWriter)
Setter for logWriter property- Parameters:
logWriter- - the new value of the logWriter property
-
setErrorLogWriter
public void setErrorLogWriter(PrintWriter errorLogWriter)
Setter for errorLogWriter property- Parameters:
errorLogWriter- - the new value of the errorLogWriter property
-
runScript
public void runScript(Reader reader) throws IOException, SQLException
Runs an SQL script (read in using the Reader parameter)- Parameters:
reader- - the source of the script- Throws:
IOExceptionSQLException
-
-