类 QueryWrapper<T>
java.lang.Object
com.baomidou.mybatisplus.core.conditions.Wrapper<T>
com.baomidou.mybatisplus.core.conditions.AbstractWrapper<T,String,QueryWrapper<T>>
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<T>
- 所有已实现的接口:
Compare<QueryWrapper<T>,String>,Func<QueryWrapper<T>,String>,Join<QueryWrapper<T>>,Nested<QueryWrapper<T>,QueryWrapper<T>>,ISqlSegment,Query<QueryWrapper<T>,T,String>,Serializable
public class QueryWrapper<T> extends AbstractWrapper<T,String,QueryWrapper<T>> implements Query<QueryWrapper<T>,T,String>
Entity 对象封装操作类
- 从以下版本开始:
- 2018-05-25
- 作者:
- hubin miemie HCL
- 另请参阅:
- 序列化表格
-
字段概要
从类继承的字段 com.baomidou.mybatisplus.core.conditions.AbstractWrapper
expression, lastSql, paramNameSeq, paramNameValuePairs, sqlComment, sqlFirst, typedThis -
构造器概要
构造器 构造器 说明 QueryWrapper()QueryWrapper(T entity)QueryWrapper(T entity, String... columns) -
方法概要
修饰符和类型 方法 说明 voidclear()条件清空StringgetSqlSelect()查询条件 SQL 片段protected QueryWrapper<T>instance()用于生成嵌套 sqlLambdaQueryWrapper<T>lambda()返回一个支持 lambda 函数写法的 wrapperQueryWrapper<T>select(Class<T> entityClass, Predicate<TableFieldInfo> predicate)过滤查询的字段信息(主键除外!)QueryWrapper<T>select(String... columns)设置查询字段从类继承的方法 com.baomidou.mybatisplus.core.conditions.AbstractWrapper
addCondition, addNestedCondition, allEq, allEq, and, and, apply, between, clone, columnsToString, columnToString, comment, doIt, eq, exists, first, formatSql, formatSqlIfNeed, func, ge, getEntity, getEntityClass, getExpression, getParamNameValuePairs, getSqlComment, getSqlFirst, getSqlSegment, groupBy, gt, having, in, initNeed, inSql, isNotNull, isNull, last, le, like, likeLeft, likeRight, likeValue, lt, ne, nested, not, not, notBetween, notExists, notIn, notInSql, notLike, or, or, orderBy, setEntity, setEntityClass从类继承的方法 com.baomidou.mybatisplus.core.conditions.Wrapper
getCustomSqlSegment, getSqlSet, getTargetSql, isEmptyOfEntity, isEmptyOfNormal, isEmptyOfWhere, nonEmptyOfEntity, nonEmptyOfNormal, nonEmptyOfWhere从类继承的方法 java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 com.baomidou.mybatisplus.core.conditions.interfaces.Compare
allEq, allEq, allEq, allEq, between, eq, ge, gt, le, like, likeLeft, likeRight, lt, ne, notBetween, notLike从接口继承的方法 com.baomidou.mybatisplus.core.conditions.interfaces.Func
func, groupBy, groupBy, having, in, in, in, inSql, isNotNull, isNull, notIn, notIn, notIn, notInSql, orderByAsc, orderByAsc, orderByAsc, orderByDesc, orderByDesc, orderByDesc
-
构造器详细资料
-
QueryWrapper
public QueryWrapper() -
QueryWrapper
-
QueryWrapper
-
-
方法详细资料
-
select
从接口复制的说明:Query设置查询字段 -
select
从接口复制的说明:Query过滤查询的字段信息(主键除外!)例1: 只要 java 字段名以 "test" 开头的 -> select(i -> i.getProperty().startsWith("test"))
例2: 只要 java 字段属性是 CharSequence 类型的 -> select(TableFieldInfo::isCharSequence)
例3: 只要 java 字段没有填充策略的 -> select(i -> i.getFieldFill() == FieldFill.DEFAULT)
例4: 要全部字段 -> select(i -> true)
例5: 只要主键字段 -> select(i -> false)
-
getSqlSelect
从接口复制的说明:Query查询条件 SQL 片段- 指定者:
getSqlSelect在接口中Query<QueryWrapper<T>,T,String>- 覆盖:
getSqlSelect在类中Wrapper<T>
-
lambda
返回一个支持 lambda 函数写法的 wrapper -
instance
用于生成嵌套 sql故 sqlSelect 不向下传递
- 指定者:
instance在类中AbstractWrapper<T,String,QueryWrapper<T>>
-
clear
public void clear()从类复制的说明:Wrapper条件清空- 覆盖:
clear在类中AbstractWrapper<T,String,QueryWrapper<T>>
-