public abstract class AbstractQueryExecute<T> extends AbstractExecute<T> implements QueryExecute<T>
dbType| 构造器和说明 |
|---|
AbstractQueryExecute(TableMapping<T> tableMapping,
LambdaTemplate jdbcTemplate) |
| 限定符和类型 | 方法和说明 |
|---|---|
BoundSql |
getBoundSql() |
BoundSql |
getBoundSql(SqlDialect dialect) |
protected abstract BoundSql |
getOriginalBoundSql() |
Page |
pageInfo() |
<V> V |
query(ResultSetExtractor<V> rse)
执行查询,并通过 ResultSetExtractor 转换结果集。
|
void |
query(RowCallbackHandler rch)
执行查询,并通过 RowCallbackHandler 处理结果集。
|
<V> List<V> |
query(RowMapper<V> rowMapper)
执行查询,并使用 RowMapper 处理结果集。
|
int |
queryForCount()
生成 select count() 查询语句并查询总数。
|
long |
queryForLargeCount()
生成 select count() 查询语句并查询总数。
|
List<T> |
queryForList()
执行查询,并结果将被映射到一个列表(一个条目为每一行)的对象,列表中每一条记录都是
elementType参数指定的类型对象。 |
Map<String,Object> |
queryForMap()
执行查询,并将结果集数据转换成
Map。 |
List<Map<String,Object>> |
queryForMapList()
执行查询,结果将被映射到一个列表(一个条目为每一行)的对象,
列表中每一条记录都是
Map类型对象。 |
T |
queryForObject()
执行查询,并返回一个结果。
|
protected abstract boolean |
supportPage()
由于 pageInfo 是在高层 QueryExecute 实现中提供的能力,因此提供一个开关。
|
<V> QueryExecute<V> |
wrapperType(Class<V> wrapperType,
MappingOptions options)
QueryExecute 的查询类型转换为另外一个类型。
|
buildTabName, dialect, enableQualifier, exampleType, getJdbcTemplate, getTableMapping, isQualifier, setDialectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwrapperTypepublic AbstractQueryExecute(TableMapping<T> tableMapping, LambdaTemplate jdbcTemplate)
protected abstract boolean supportPage()
public final BoundSql getBoundSql(SqlDialect dialect)
getBoundSql 在接口中 BoundSqlBuilderpublic final BoundSql getBoundSql()
getBoundSql 在接口中 BoundSqlBuilderprotected abstract BoundSql getOriginalBoundSql()
public Page pageInfo()
public <V> QueryExecute<V> wrapperType(Class<V> wrapperType, MappingOptions options)
QueryExecutewrapperType 在接口中 QueryExecute<T>public <V> V query(ResultSetExtractor<V> rse) throws SQLException
QueryExecutequery 在接口中 QueryExecute<T>SQLExceptionpublic void query(RowCallbackHandler rch) throws SQLException
QueryExecutequery 在接口中 QueryExecute<T>SQLExceptionpublic <V> List<V> query(RowMapper<V> rowMapper) throws SQLException
QueryExecutequery 在接口中 QueryExecute<T>SQLExceptionpublic List<T> queryForList() throws SQLException
QueryExecuteelementType参数指定的类型对象。queryForList 在接口中 QueryExecute<T>SQLExceptionpublic T queryForObject() throws SQLException
QueryExecutequeryForObject 在接口中 QueryExecute<T>SQLExceptionpublic Map<String,Object> queryForMap() throws SQLException
QueryExecuteMap。
预计该方法只会处理一条数据,如果查询结果存在多条数据将取第一条记录作为结果。queryForMap 在接口中 QueryExecute<T>null。SQLExceptionpublic List<Map<String,Object>> queryForMapList() throws SQLException
QueryExecuteMap类型对象。queryForMapList 在接口中 QueryExecute<T>SQLExceptionpublic int queryForCount()
throws SQLException
QueryExecutequeryForCount 在接口中 QueryExecute<T>SQLExceptionpublic long queryForLargeCount()
throws SQLException
QueryExecutequeryForLargeCount 在接口中 QueryExecute<T>SQLExceptionCopyright © 2021. All rights reserved.