public class ScriptRunner extends Object
| Constructor and Description |
|---|
ScriptRunner(Connection connection,
boolean autoCommit,
boolean stopOnError)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
runScript(Reader reader,
boolean canFail)
Runs a SQL script (read in using the Reader parameter).
|
void |
setDelimiter(String delimiter,
boolean fullLineDelimiter) |
public ScriptRunner(Connection connection, boolean autoCommit, boolean stopOnError)
connection - database connectionautoCommit - true when to autocommitstopOnError - true when to stop on errorpublic void setDelimiter(String delimiter, boolean fullLineDelimiter)
public void runScript(Reader reader, boolean canFail) throws IOException, SQLException
reader - the source of the scriptIOException - if any occurs connecting to the databaseSQLException - if any occurs executing the scriptCopyright © 2019. All rights reserved.