public class SQLExecutor extends Object
Constructor and Description |
---|
SQLExecutor() |
Modifier and Type | Method and Description |
---|---|
static SQLExecutionInfo |
execute(DatabaseConnection dbconn,
String sql)
Execute SQL and log summary information about the results and any errors
are logged to the error log file.
|
static SQLExecutionInfo |
execute(DatabaseConnection dbconn,
String sql,
SQLExecuteLogger logger)
Execute SQL.
|
public static SQLExecutionInfo execute(DatabaseConnection dbconn, String sql) throws DatabaseException
dbconn
- the database connection to use when executing the SQLsql
- the SQL which contains one or more valid SQL statementsIllegalStateException
- if this is executed on the AWT event threadDatabaseException
- if the database connection is not connectedpublic static SQLExecutionInfo execute(DatabaseConnection dbconn, String sql, SQLExecuteLogger logger) throws DatabaseException
dbconn
- the database connection to use when executing the SQLsql
- the SQL which contains one or more valid SQL statementslogger
- this object is notified with execution information when execution
of each statement completes and when the entire execution completes or is cancelled.IllegalStateException
- if this is executed on the AWT event threadDatabaseException
- if the database connection is not connected