Class LambdaQueryWrapper<T>
java.lang.Object
com.baomidou.mybatisplus.core.conditions.Wrapper<T>
com.baomidou.mybatisplus.core.conditions.AbstractWrapper<T,SFunction<T,?>,LambdaQueryWrapper<T>>
com.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper<T,LambdaQueryWrapper<T>>
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<T>
- All Implemented Interfaces:
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
- Since:
- 2017-05-26
- Author:
- hubin miemie HCL
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.baomidou.mybatisplus.core.conditions.AbstractWrapper
AbstractWrapper.DoSomething -
Field Summary
FieldsFields inherited from class com.baomidou.mybatisplus.core.conditions.AbstractWrapper
expression, lastSql, paramAlias, paramNameSeq, paramNameValuePairs, sqlComment, sqlFirst, typedThis -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()条件清空protected LambdaQueryWrapper<T> 查询条件 SQL 片段protected LambdaQueryWrapper<T> instance()用于生成嵌套 sqlfinal LambdaQueryWrapper<T> 指定查询字段指定查询字段final LambdaQueryWrapper<T> 指定查询字段select(Class<T> entityClass, Predicate<TableFieldInfo> predicate) 过滤查询的字段信息(主键除外!)Methods inherited from class com.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper
columnsToString, columnsToString, columnsToString, columnToMapping, columnToString, columnToString, getColumnCache, groupBy, groupBy, groupBy, orderBy, orderByAsc, orderByAsc, orderByDesc, orderByDescMethods inherited from class com.baomidou.mybatisplus.core.conditions.AbstractWrapper
addCondition, addNestedCondition, allEq, allEq, and, and, appendSqlSegments, apply, between, clone, columnsToString, columnToSqlSegment, comment, doGroupBy, doOrderBy, eq, eqOrIsNull, eqSql, exists, first, formatParam, formatSqlMaybeWithParam, func, ge, geSql, getEntity, getEntityClass, getExpression, getParamAlias, getParamNameValuePairs, getSqlComment, getSqlFirst, getSqlSegment, groupBy, groupBy, gt, gtSql, having, in, in, inExpression, inExpression, inExpression, inExpression, initNeed, inSql, isNotNull, isNull, isUseAnnotationOrderBy, last, le, leSql, like, likeLeft, likeRight, likeValue, lt, ltSql, maybeDo, ne, nested, not, not, notBetween, notExists, notIn, notIn, notInSql, notLike, notLikeLeft, notLikeRight, onParamAliasChanged, or, or, orderBy, orderBy, orderBy, setEntity, setEntityClass, setParamAliasMethods inherited from class com.baomidou.mybatisplus.core.conditions.Wrapper
getCustomSqlSegment, getSqlSet, getTargetSql, isEmptyOfEntity, isEmptyOfNormal, isEmptyOfWhere, isNonEmptyOfEntity, isNonEmptyOfNormal, isNonEmptyOfWhere, nonEmptyOfEntity, nonEmptyOfNormal, nonEmptyOfWhereMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.baomidou.mybatisplus.core.conditions.interfaces.Compare
allEq, allEq, allEq, allEq, between, eq, eqOrIsNull, ge, gt, le, like, likeLeft, likeRight, lt, ne, notBetween, notLike, notLikeLeft, notLikeRightMethods inherited from interface com.baomidou.mybatisplus.core.conditions.interfaces.Func
eqSql, func, geSql, groupBy, groupBy, gtSql, having, in, in, inSql, isNotNull, isNull, leSql, ltSql, notIn, notIn, notInSql, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDescMethods inherited from interface com.baomidou.mybatisplus.core.conditions.interfaces.Join
apply, comment, exists, first, last, notExists, or
-
Field Details
-
sqlSelect
查询字段
-
-
Constructor Details
-
LambdaQueryWrapper
public LambdaQueryWrapper() -
LambdaQueryWrapper
-
LambdaQueryWrapper
-
-
Method Details
-
select
Description copied from interface:Query指定查询字段 -
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)
-
select
Description copied from interface:Query指定查询字段 -
select
@SafeVarargs public final LambdaQueryWrapper<T> select(boolean condition, SFunction<T, ?>... columns) Description copied from interface:Query指定查询字段 -
doSelect
- Since:
- 3.5.4
-
getSqlSelect
Description copied from interface:Query查询条件 SQL 片段- Specified by:
getSqlSelectin interfaceQuery<LambdaQueryWrapper<T>,T, SFunction<T, ?>> - Overrides:
getSqlSelectin classWrapper<T>
-
instance
用于生成嵌套 sql故 sqlSelect 不向下传递
- Specified by:
instancein classAbstractWrapper<T,SFunction<T, ?>, LambdaQueryWrapper<T>>
-
clear
public void clear()Description copied from class:Wrapper条件清空- Overrides:
clearin classAbstractWrapper<T,SFunction<T, ?>, LambdaQueryWrapper<T>>
-