|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentabean.util.ScriptRunner
public class ScriptRunner
Tool to run database scripts. This version of the script can be found at https://gist.github.com/gists/831762/
| Constructor Summary | |
|---|---|
ScriptRunner(Connection conn)
|
|
ScriptRunner(Connection connection,
boolean autoCommit,
boolean stopOnError)
Default constructor. |
|
| Method Summary | |
|---|---|
void |
runScript(Reader reader)
Runs an SQL script (read in using the Reader parameter). |
void |
setDelimiter(String delimiter,
boolean fullLineDelimiter)
|
void |
setErrorLogWriter(PrintWriter errorLogWriter)
Setter for errorLogWriter property. |
void |
setLogWriter(PrintWriter logWriter)
Setter for logWriter property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScriptRunner(Connection connection,
boolean autoCommit,
boolean stopOnError)
connection - autoCommit - stopOnError - public ScriptRunner(Connection conn)
| Method Detail |
|---|
public void setDelimiter(String delimiter,
boolean fullLineDelimiter)
delimiter - fullLineDelimiter - public void setLogWriter(PrintWriter logWriter)
logWriter - - the new value of the logWriter propertypublic void setErrorLogWriter(PrintWriter errorLogWriter)
errorLogWriter - - the new value of the errorLogWriter property
public void runScript(Reader reader)
throws IOException,
SQLException
reader - - the source of the script
SQLException - if any SQL errors occur
IOException - if there is an error reading from the Reader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||