Class SqlScriptExecutor
java.lang.Object
net.sf.jailer.util.SqlScriptExecutor
Reads in and executes SQL-scripts.
- Author:
- Ralf Wisser
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSqlScriptExecutor(Session session, int threads) Constructor.SqlScriptExecutor(Session session, int threads, boolean logStatements) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionexecuteScript(String scriptFileName) Reads in and executes a SQL-script.executeScript(String scriptFileName, boolean transactional) Reads in and executes a SQL-script.Gets the statement and row count from the last script execution.
-
Field Details
-
UNFINISHED_MULTILINE_COMMENT
Comment prefix for multi-line comments.- See Also:
-
FINISHED_MULTILINE_COMMENT
Comment prefix for last line of a multi-line comment.- See Also:
-
-
Constructor Details
-
SqlScriptExecutor
Constructor.- Parameters:
session- for execution of statementsthreads- number of threads to uselogStatements- log statements?
-
SqlScriptExecutor
Constructor.- Parameters:
session- for execution of statementsthreads- number of threads to use
-
-
Method Details
-
executeScript
public Pair<Integer,Long> executeScript(String scriptFileName, boolean transactional) throws IOException, SQLException Reads in and executes a SQL-script.- Parameters:
scriptFileName- the name of the script-filetransactional-trueto execute the script within a transaction- Returns:
- Pair(statementCount, rowCount)
- Throws:
IOExceptionSQLException
-
executeScript
Reads in and executes a SQL-script.- Parameters:
scriptFileName- the name of the script-file- Returns:
- Pair(statementCount, rowCount)
- Throws:
IOExceptionSQLException
-
getLastStatementCount
-