public class JdbcExecutor extends AbstractExecutor implements Executor
database
Constructor and Description |
---|
JdbcExecutor() |
Modifier and Type | Method and Description |
---|---|
void |
comment(java.lang.String message)
Adds a comment to the database.
|
java.lang.Object |
execute(liquibase.executor.jvm.CallableStatementCallback action,
java.util.List<SqlVisitor> sqlVisitors) |
void |
execute(SqlStatement sql)
Write methods
|
void |
execute(SqlStatement sql,
java.util.List<SqlVisitor> sqlVisitors) |
java.lang.Object |
execute(liquibase.executor.jvm.StatementCallback action,
java.util.List<SqlVisitor> sqlVisitors) |
protected RowMapper |
getColumnMapRowMapper()
Create a new RowMapper for reading columns as key-value pairs.
|
protected RowMapper |
getSingleColumnRowMapper(java.lang.Class requiredType)
Create a new RowMapper for reading result objects from a single column.
|
java.lang.Object |
query(SqlStatement sql,
liquibase.executor.jvm.ResultSetExtractor rse) |
java.lang.Object |
query(SqlStatement sql,
liquibase.executor.jvm.ResultSetExtractor rse,
java.util.List<SqlVisitor> sqlVisitors) |
java.util.List |
query(SqlStatement sql,
RowMapper rowMapper) |
java.util.List |
query(SqlStatement sql,
RowMapper rowMapper,
java.util.List<SqlVisitor> sqlVisitors) |
int |
queryForInt(SqlStatement sql) |
int |
queryForInt(SqlStatement sql,
java.util.List<SqlVisitor> sqlVisitors) |
java.util.List<java.util.Map<java.lang.String,?>> |
queryForList(SqlStatement sql) |
java.util.List |
queryForList(SqlStatement sql,
java.lang.Class elementType) |
java.util.List |
queryForList(SqlStatement sql,
java.lang.Class elementType,
java.util.List<SqlVisitor> sqlVisitors) |
java.util.List<java.util.Map<java.lang.String,?>> |
queryForList(SqlStatement sql,
java.util.List<SqlVisitor> sqlVisitors) |
long |
queryForLong(SqlStatement sql) |
long |
queryForLong(SqlStatement sql,
java.util.List<SqlVisitor> sqlVisitors) |
<T> T |
queryForObject(SqlStatement sql,
java.lang.Class<T> requiredType)
Read methods
|
<T> T |
queryForObject(SqlStatement sql,
java.lang.Class<T> requiredType,
java.util.List<SqlVisitor> sqlVisitors) |
java.lang.Object |
queryForObject(SqlStatement sql,
RowMapper rowMapper) |
java.lang.Object |
queryForObject(SqlStatement sql,
RowMapper rowMapper,
java.util.List<SqlVisitor> sqlVisitors) |
int |
update(SqlStatement sql) |
int |
update(SqlStatement sql,
java.util.List<SqlVisitor> sqlVisitors) |
boolean |
updatesDatabase() |
applyVisitors, setDatabase
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setDatabase
public boolean updatesDatabase()
updatesDatabase
in interface Executor
public java.lang.Object execute(liquibase.executor.jvm.StatementCallback action, java.util.List<SqlVisitor> sqlVisitors) throws DatabaseException
DatabaseException
public java.lang.Object execute(liquibase.executor.jvm.CallableStatementCallback action, java.util.List<SqlVisitor> sqlVisitors) throws DatabaseException
DatabaseException
public void execute(SqlStatement sql) throws DatabaseException
Executor
execute
in interface Executor
DatabaseException
public void execute(SqlStatement sql, java.util.List<SqlVisitor> sqlVisitors) throws DatabaseException
execute
in interface Executor
DatabaseException
public java.lang.Object query(SqlStatement sql, liquibase.executor.jvm.ResultSetExtractor rse) throws DatabaseException
DatabaseException
public java.lang.Object query(SqlStatement sql, liquibase.executor.jvm.ResultSetExtractor rse, java.util.List<SqlVisitor> sqlVisitors) throws DatabaseException
DatabaseException
public java.util.List query(SqlStatement sql, RowMapper rowMapper) throws DatabaseException
DatabaseException
public java.util.List query(SqlStatement sql, RowMapper rowMapper, java.util.List<SqlVisitor> sqlVisitors) throws DatabaseException
DatabaseException
public java.lang.Object queryForObject(SqlStatement sql, RowMapper rowMapper) throws DatabaseException
DatabaseException
public java.lang.Object queryForObject(SqlStatement sql, RowMapper rowMapper, java.util.List<SqlVisitor> sqlVisitors) throws DatabaseException
DatabaseException
public <T> T queryForObject(SqlStatement sql, java.lang.Class<T> requiredType) throws DatabaseException
Executor
queryForObject
in interface Executor
DatabaseException
public <T> T queryForObject(SqlStatement sql, java.lang.Class<T> requiredType, java.util.List<SqlVisitor> sqlVisitors) throws DatabaseException
queryForObject
in interface Executor
DatabaseException
public long queryForLong(SqlStatement sql) throws DatabaseException
queryForLong
in interface Executor
DatabaseException
public long queryForLong(SqlStatement sql, java.util.List<SqlVisitor> sqlVisitors) throws DatabaseException
queryForLong
in interface Executor
DatabaseException
public int queryForInt(SqlStatement sql) throws DatabaseException
queryForInt
in interface Executor
DatabaseException
public int queryForInt(SqlStatement sql, java.util.List<SqlVisitor> sqlVisitors) throws DatabaseException
queryForInt
in interface Executor
DatabaseException
public java.util.List queryForList(SqlStatement sql, java.lang.Class elementType) throws DatabaseException
queryForList
in interface Executor
DatabaseException
public java.util.List queryForList(SqlStatement sql, java.lang.Class elementType, java.util.List<SqlVisitor> sqlVisitors) throws DatabaseException
queryForList
in interface Executor
DatabaseException
public java.util.List<java.util.Map<java.lang.String,?>> queryForList(SqlStatement sql) throws DatabaseException
queryForList
in interface Executor
DatabaseException
public java.util.List<java.util.Map<java.lang.String,?>> queryForList(SqlStatement sql, java.util.List<SqlVisitor> sqlVisitors) throws DatabaseException
queryForList
in interface Executor
DatabaseException
public int update(SqlStatement sql) throws DatabaseException
update
in interface Executor
DatabaseException
public int update(SqlStatement sql, java.util.List<SqlVisitor> sqlVisitors) throws DatabaseException
update
in interface Executor
DatabaseException
protected RowMapper getColumnMapRowMapper()
ColumnMapRowMapper
protected RowMapper getSingleColumnRowMapper(java.lang.Class requiredType)
requiredType
- the type that each result object is expected to matchSingleColumnRowMapper
public void comment(java.lang.String message) throws DatabaseException
Executor
comment
in interface Executor
DatabaseException