public class LoggingExecutor extends AbstractExecutor
database, resourceAccessorPRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED| Constructor and Description |
|---|
LoggingExecutor(Executor delegatedExecutor,
Writer output,
Database database) |
| Modifier and Type | Method and Description |
|---|---|
void |
comment(String message)
Adds a comment to the database.
|
void |
execute(SqlStatement sql) |
void |
execute(SqlStatement sql,
List<SqlVisitor> sqlVisitors) |
String |
getName()
Return the name of the Executor
|
protected Writer |
getOutput() |
int |
getPriority()
Return the Executor priority
|
int |
queryForInt(SqlStatement sql)
Executes a query that is expected to return a scalar (1 row, 1 column).
|
int |
queryForInt(SqlStatement sql,
List<SqlVisitor> sqlVisitors)
Applies a number of SqlVisitors to the sql query.
|
List<Map<String,?>> |
queryForList(SqlStatement sql)
Executes a given SQL statement and returns a List of rows.
|
List |
queryForList(SqlStatement sql,
Class elementType) |
List |
queryForList(SqlStatement sql,
Class elementType,
List<SqlVisitor> sqlVisitors) |
List<Map<String,?>> |
queryForList(SqlStatement sql,
List<SqlVisitor> sqlVisitors)
Applies a list of SqlVisitors to the SQL query, then executes the (possibly modified) SQL query and lastly,
returns the list of rows.
|
long |
queryForLong(SqlStatement sql)
Executes a query that is expected to return a scalar (1 row, 1 column).
|
long |
queryForLong(SqlStatement sql,
List<SqlVisitor> sqlVisitors)
Applies a number of SqlVisitors to the sql query.
|
<T> T |
queryForObject(SqlStatement sql,
Class<T> requiredType)
Execute a query that is expected to return a scalar (1 row, 1 column).
|
<T> T |
queryForObject(SqlStatement sql,
Class<T> requiredType,
List<SqlVisitor> sqlVisitors)
Applies a number of SqlVisitors to the sql query.
|
int |
update(SqlStatement sql) |
int |
update(SqlStatement sql,
List<SqlVisitor> sqlVisitors) |
boolean |
updatesDatabase() |
applyVisitors, execute, execute, modifyChangeSet, setDatabase, setResourceAccessor, validatepublic String getName()
getName in interface ExecutorgetName in class AbstractExecutorpublic int getPriority()
getPriority in interface ExecutorgetPriority in class AbstractExecutorprotected Writer getOutput()
public void execute(SqlStatement sql) throws DatabaseException
DatabaseExceptionpublic int update(SqlStatement sql) throws DatabaseException
DatabaseExceptionpublic void execute(SqlStatement sql, List<SqlVisitor> sqlVisitors) throws DatabaseException
DatabaseExceptionpublic int update(SqlStatement sql, List<SqlVisitor> sqlVisitors) throws DatabaseException
DatabaseExceptionpublic void comment(String message) throws DatabaseException
ExecutorDatabaseExceptionpublic <T> T queryForObject(SqlStatement sql, Class<T> requiredType) throws DatabaseException
Executorsql - The query to executeDatabaseException - in case something goes wrong during the query executionpublic <T> T queryForObject(SqlStatement sql, Class<T> requiredType, List<SqlVisitor> sqlVisitors) throws DatabaseException
Executorsql - The query to executeDatabaseException - in case something goes wrong during the query executionpublic long queryForLong(SqlStatement sql) throws DatabaseException
Executorsql - The query to executeDatabaseException - in case something goes wrong during the query executionpublic long queryForLong(SqlStatement sql, List<SqlVisitor> sqlVisitors) throws DatabaseException
Executorsql - The query to executeDatabaseException - in case something goes wrong during the query executionpublic int queryForInt(SqlStatement sql) throws DatabaseException
Executorsql - The query to executeDatabaseException - in case something goes wrong during the query executionpublic int queryForInt(SqlStatement sql, List<SqlVisitor> sqlVisitors) throws DatabaseException
Executorsql - The query to executeDatabaseException - in case something goes wrong during the query executionpublic List queryForList(SqlStatement sql, Class elementType) throws DatabaseException
DatabaseExceptionpublic List queryForList(SqlStatement sql, Class elementType, List<SqlVisitor> sqlVisitors) throws DatabaseException
DatabaseExceptionpublic List<Map<String,?>> queryForList(SqlStatement sql) throws DatabaseException
Executorsql - the SQL query to executeDatabaseException - if an error occurs during SQL processing (e.g. the SQL is not valid for the database)public List<Map<String,?>> queryForList(SqlStatement sql, List<SqlVisitor> sqlVisitors) throws DatabaseException
Executorsql - the SQL query to executeDatabaseException - if an error occurs during SQL processing (e.g. the SQL is not valid for the database)public boolean updatesDatabase()
Copyright © 2022 Liquibase.org. All rights reserved.