类 LambdaQueryWrapper<T>
java.lang.Object
com.baomidou.mybatisplus.core.conditions.Wrapper<T>
com.baomidou.mybatisplus.core.conditions.AbstractWrapper<T,SFunction<T,?>,Children>
com.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper<T,LambdaQueryWrapper<T>>
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<T>
- 所有已实现的接口:
Compare<LambdaQueryWrapper<T>,SFunction<T,?>>
,Func<LambdaQueryWrapper<T>,SFunction<T,?>>
,Join<LambdaQueryWrapper<T>>
,Nested<LambdaQueryWrapper<T>,LambdaQueryWrapper<T>>
,ISqlSegment
,Query<LambdaQueryWrapper<T>,T,SFunction<T,?>>
,Serializable
public class LambdaQueryWrapper<T> extends AbstractLambdaWrapper<T,LambdaQueryWrapper<T>> implements Query<LambdaQueryWrapper<T>,T,SFunction<T,?>>
Lambda 语法使用 Wrapper
- 从以下版本开始:
- 2017-05-26
- 作者:
- hubin miemie HCL
- 另请参阅:
- 序列化表格
-
字段概要
从类继承的字段 com.baomidou.mybatisplus.core.conditions.AbstractWrapper
expression, lastSql, paramNameSeq, paramNameValuePairs, sqlComment, sqlFirst, typedThis
-
构造器概要
构造器 构造器 说明 LambdaQueryWrapper()
不建议直接 new 该实例,使用 Wrappers.lambdaQuery(entity)LambdaQueryWrapper(Class<T> entityClass)
不建议直接 new 该实例,使用 Wrappers.lambdaQuery(entity)LambdaQueryWrapper(T entity)
不建议直接 new 该实例,使用 Wrappers.lambdaQuery(entity) -
方法概要
修饰符和类型 方法 说明 void
clear()
条件清空String
getSqlSelect()
查询条件 SQL 片段protected LambdaQueryWrapper<T>
instance()
用于生成嵌套 sqlLambdaQueryWrapper<T>
select(SFunction<T,?>... columns)
SELECT 部分 SQL 设置LambdaQueryWrapper<T>
select(Class<T> entityClass, Predicate<TableFieldInfo> predicate)
过滤查询的字段信息(主键除外!)从类继承的方法 com.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper
columnsToString, columnsToString, columnToString, columnToString
从类继承的方法 com.baomidou.mybatisplus.core.conditions.AbstractWrapper
addCondition, addNestedCondition, allEq, allEq, and, and, apply, between, clone, 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
-
构造器详细资料
-
LambdaQueryWrapper
public LambdaQueryWrapper()不建议直接 new 该实例,使用 Wrappers.lambdaQuery(entity) -
LambdaQueryWrapper
不建议直接 new 该实例,使用 Wrappers.lambdaQuery(entity) -
LambdaQueryWrapper
不建议直接 new 该实例,使用 Wrappers.lambdaQuery(entity)
-
-
方法详细资料
-
select
SELECT 部分 SQL 设置 -
select
过滤查询的字段信息(主键除外!)例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<LambdaQueryWrapper<T>,T,SFunction<T,?>>
- 覆盖:
getSqlSelect
在类中Wrapper<T>
-
instance
用于生成嵌套 sql故 sqlSelect 不向下传递
- 指定者:
instance
在类中AbstractWrapper<T,SFunction<T,?>,LambdaQueryWrapper<T>>
-
clear
public void clear()从类复制的说明:Wrapper
条件清空- 覆盖:
clear
在类中AbstractWrapper<T,SFunction<T,?>,LambdaQueryWrapper<T>>
-