public class ScriptRunner extends java.lang.Object
| 构造器和说明 |
|---|
ScriptRunner(boolean autoCommit,
boolean stopOnError)
Default constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
runScript(java.io.InputStream input)
Runs an SQL script (read in using the InputStream parameter).
|
void |
runScript(java.io.Reader reader)
Runs an SQL script (read in using the Reader parameter).
|
void |
runScript(java.lang.String input)
Runs an SQL script (read in using the String parameter).
|
ScriptRunner |
setDelimiter(java.lang.String delimiter,
boolean fullLineDelimiter)
Sets the delimiter.
|
ScriptRunner |
setErrorLogWriter(java.io.PrintWriter errorLogWriter)
Setter for errorLogWriter property.
|
ScriptRunner |
setLogWriter(java.io.PrintWriter logWriter)
Setter for logWriter property.
|
public ScriptRunner(boolean autoCommit, boolean stopOnError)
autoCommit - the auto commitstopOnError - stop on errorpublic ScriptRunner setDelimiter(java.lang.String delimiter, boolean fullLineDelimiter)
delimiter - the delimiterfullLineDelimiter - the full line delimiterpublic ScriptRunner setLogWriter(java.io.PrintWriter logWriter)
logWriter - - the new value of the logWriter propertypublic ScriptRunner setErrorLogWriter(java.io.PrintWriter errorLogWriter)
errorLogWriter - - the new value of the errorLogWriter propertypublic void runScript(java.io.Reader reader) throws java.io.IOException, DaoException
reader - - the source of the scriptjava.io.IOException - Signals that an I/O exception has occurred.DaoException - the wrapped SQL exceptionpublic void runScript(java.lang.String input) throws java.io.IOException, DaoException
input - - the source of the scriptjava.io.IOExceptionDaoExceptionpublic void runScript(java.io.InputStream input) throws java.io.IOException, DaoException
input - - the source of the scriptjava.io.IOExceptionDaoExceptionCopyright © 2020. All Rights Reserved.