public class QueryWrapper<T> extends AbstractWrapper<T,QueryWrapper<T>,String> implements WrapperQuery<T,QueryWrapper<T>,String>, WrapperString<T,QueryWrapper<T>>
WrapperQuery.OrderBy| 限定符和类型 | 字段和说明 |
|---|---|
private List<String> |
groupBys |
private String |
havingSql |
private List<Object> |
havingValues |
private String |
lastSql |
private List<WrapperQuery.OrderBy> |
orderBys |
private String |
sqlSelect |
private String |
tableName |
entityClass, paramIndex| 限定符 | 构造器和说明 |
|---|---|
|
QueryWrapper() |
|
QueryWrapper(Class<T> entityClass) |
|
QueryWrapper(T entity) |
private |
QueryWrapper(T entity,
Class<T> entityClass) |
| 限定符和类型 | 方法和说明 |
|---|---|
SQLInfo<T> |
build()
编译成SQL
|
QueryWrapper<T> |
groupBy(boolean condition,
String... columns)
group by column[0],column[1]...
|
<E extends Wrapper<T,E,String>> |
having(boolean condition,
java.util.function.Consumer<Wrapper<T,E,String>> consumer)
having $wrapper
|
LambdaQueryWrapper<T> |
lambda() |
QueryWrapper<T> |
last(boolean condition,
String sql)
sql 最后拼接
|
QueryWrapper<T> |
orderBy(boolean condition,
boolean isAsc,
String... columns)
order by
|
QueryWrapper<T> |
orderByAsc(boolean condition,
String... columns)
order by column[0] ASC, column[1] ASC ,...
|
QueryWrapper<T> |
orderByDesc(boolean condition,
String... columns)
order by column[0] DESC, column[1] DESC ,...
|
QueryWrapper<T> |
select(boolean condition,
boolean distinct,
String... columns)
SELECT DISTINCT column[0], column[1]...
|
and, and, between, eq, exists, ge, getColumn, getEntityClass, getWhereSql, getWrap, gt, in, in, in, isNotNull, isNull, le, like, likeLeft, likeRight, lt, ne, notExists, notIn, notIn, notIn, notLike, notLikeLeft, notLikeRight, or, or, resetSqlclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOrderBys, getSqlSelect, getTableName, groupBy, having, last, orderBy, orderByAsc, orderByDesc, select, select, setTableNameand, and, and, and, between, between, eq, eq, exists, exists, ge, ge, gt, gt, in, in, in, in, in, in, isNotNull, isNotNull, isNull, isNull, le, le, like, like, likeLeft, likeLeft, likeRight, likeRight, lt, lt, ne, ne, notExists, notExists, notIn, notIn, notIn, notIn, notIn, notIn, notLike, notLike, notLikeLeft, notLikeLeft, notLikeRight, notLikeRight, or, or, or, orgetEntityClass, getWhereSqlprivate String tableName
private String sqlSelect
private final List<WrapperQuery.OrderBy> orderBys
private String havingSql
private String lastSql
public QueryWrapper()
public QueryWrapper(T entity)
public QueryWrapper<T> select(boolean condition, boolean distinct, String... columns)
WrapperQueryselect 在接口中 WrapperQuery<T,QueryWrapper<T>,String>condition - 条件distinct - distinctcolumns - 列public QueryWrapper<T> groupBy(boolean condition, String... columns)
WrapperQuerygroupBy 在接口中 WrapperQuery<T,QueryWrapper<T>,String>public <E extends Wrapper<T,E,String>> QueryWrapper<T> having(boolean condition, java.util.function.Consumer<Wrapper<T,E,String>> consumer)
WrapperQueryhaving 在接口中 WrapperQuery<T,QueryWrapper<T>,String>public QueryWrapper<T> orderByAsc(boolean condition, String... columns)
WrapperQueryorderByAsc 在接口中 WrapperQuery<T,QueryWrapper<T>,String>public QueryWrapper<T> orderByDesc(boolean condition, String... columns)
WrapperQueryorderByDesc 在接口中 WrapperQuery<T,QueryWrapper<T>,String>public QueryWrapper<T> orderBy(boolean condition, boolean isAsc, String... columns)
WrapperQueryorderBy 在接口中 WrapperQuery<T,QueryWrapper<T>,String>condition - 是否执行isAsc - 是否正序columns - 排序列public QueryWrapper<T> last(boolean condition, String sql)
WrapperQuerylast 在接口中 WrapperQuery<T,QueryWrapper<T>,String>sql - 拼接sqlpublic LambdaQueryWrapper<T> lambda()
public SQLInfo<T> build()
BaseWrapperbuild 在接口中 BaseWrapper<T,String>build 在类中 AbstractWrapper<T,QueryWrapper<T>,String>Copyright © 2024. All rights reserved.