E - 实体类型public interface IQuery<E extends IEntity>
| 限定符和类型 | 方法和说明 |
|---|---|
WrapperData |
data()
返回查询器或更新器对应的xml数据
系统方法, 请勿调用
|
<Q extends IQuery<E>> |
distinct()
distinct 查询
|
default <R> R |
execute(Function<IQuery<E>,R> executor)
已过时。
replaced by
#of(IRichMapper).method(...) |
<Q extends IQuery<E>> |
last(String lastSql)
追加在sql语句的末尾
!!!
|
<Q extends IQuery<E>> |
limit(int limit)
设置limit值
|
<Q extends IQuery<E>> |
limit(int start,
int limit)
设置limit值
|
Optional<IMapping> |
mapping()
数据库映射定义
|
default QueryExecutor<E> |
of(IRichMapper<E> mapper)
根据Query定义执行后续操作
|
OrderByBase |
orderBy()
返回order排序
|
default <Q extends IQuery<E>> |
paged(int currPage,
int pageSize)
设置分页参数(会转换为limit入参)
|
<Q extends IQuery<E>> |
selectAll()
查询Entity所有字段
|
<Q extends IQuery<E>> |
selectId()
只查询主键字段
|
default QueryExecutor<E> |
to()
根据Query定义执行后续操作
要使用本方法
需要定义
MapperFactory spring bean
same as of(IRichMapper) 方法
|
IQuery |
union(IQuery... queries)
select * from a where...
|
IQuery |
unionAll(IQuery... queries)
select * from a where...
|
WhereBase |
where()
返回where
|
<Q extends IQuery<E>> Q limit(int start, int limit)
start - 开始查询偏移量limit - 最大查询数量default <Q extends IQuery<E>> Q paged(int currPage, int pageSize)
currPage - 当前页码, 从1开始计数pageSize - 每页记录数<Q extends IQuery<E>> Q last(String lastSql)
lastSql - 追加SQLWhereBase where()
OrderByBase orderBy()
WrapperData data()
default QueryExecutor<E> to()
要使用本方法 需要定义MapperFactoryspring bean same asof(IRichMapper)方法
default QueryExecutor<E> of(IRichMapper<E> mapper)
mapper - 执行操作的mapper@Deprecated default <R> R execute(Function<IQuery<E>,R> executor)
#of(IRichMapper).method(...)R - 结果类型executor - 具体查询操作IQuery union(IQuery... queries)
queries - 查询条件列表Copyright © 2022. All rights reserved.