Package nl.b3p.topnl
Class ScriptRunner
java.lang.Object
nl.b3p.topnl.ScriptRunner
Tool to run database scripts
-
Constructor Summary
ConstructorDescriptionScriptRunner
(Connection connection, boolean autoCommit, boolean stopOnError) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Runs a SQL script (read in using the Reader parameter).void
setDelimiter
(String delimiter, boolean fullLineDelimiter)
-
Constructor Details
-
ScriptRunner
Default constructor.- Parameters:
connection
- database connectionautoCommit
-true
when to autocommitstopOnError
-true
when to stop on error
-
-
Method Details
-
setDelimiter
-
runScript
Runs a SQL script (read in using the Reader parameter).- Parameters:
reader
- the source of the script- Throws:
IOException
- if any occurs connecting to the databaseSQLException
- if any occurs executing the script
-