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)
Runs an SQL script (read in using the Reader parameter).
|
void |
setDelimiter(String delimiter)
Setter for
delimiter property. |
void |
setErrorLogWriter(PrintWriter errorLogWriter)
Setter for
errorLogWriter property. |
void |
setLogWriter(PrintWriter logWriter)
Setter for
logWriter property. |
public ScriptRunner(Connection connection, boolean autoCommit, boolean stopOnError)
connection - ConnectionautoCommit - Enables/Disables autoCommitstopOnError - Enables/Disables stopOnErrorpublic void setDelimiter(String delimiter)
delimiter property.delimiter - new vslue of the delimiter propertypublic void setLogWriter(PrintWriter logWriter)
logWriter property.logWriter - - the new value of the logWriter propertypublic void setErrorLogWriter(PrintWriter errorLogWriter)
errorLogWriter property.errorLogWriter - - the new value of the errorLogWriter propertypublic void runScript(Reader reader) throws IOException, SQLException
reader - - the source of the scriptIOException - if there is an error reading from the ReaderSQLException - if any SQL errors occurRuntimeException - "Error running script. Cause: "Copyright © 2012–2026 cismet GmbH. All rights reserved.