public class LambdaTreeWrapper<T> extends com.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper<T,LambdaTreeWrapper<T>> implements com.baomidou.mybatisplus.core.conditions.query.Query<LambdaTreeWrapper<T>,T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>>
| 构造器和说明 |
|---|
LambdaTreeWrapper(Class<T> entityClass,
com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?> id,
com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?> parentId) |
LambdaTreeWrapper(T entity,
com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?> id,
com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?> parentId) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
String |
getSqlSelect() |
protected LambdaTreeWrapper<T> |
instance()
用于生成嵌套 sql
故 sqlSelect 不向下传递
|
LambdaTreeWrapper<T> |
lazy(Object parentIdValue) |
LambdaTreeWrapper<T> |
select(boolean condition,
List<com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>> columns)
指定查询字段
|
LambdaTreeWrapper<T> |
select(Class<T> entityClass,
Predicate<com.baomidou.mybatisplus.core.metadata.TableFieldInfo> predicate)
过滤查询的字段信息(主键除外!)
|
LambdaTreeWrapper<T> |
select(com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>... columns)
SELECT 部分 SQL 设置
|
TreeWrapper<T> |
unLambda()
返回一个不是 lambda 函数写法的 wrapper
|
columnsToString, columnsToString, columnsToString, columnToString, columnToString, getColumnCache, groupBy, groupBy, groupBy, orderBy, orderByAsc, orderByAsc, orderByDesc, orderByDescaddCondition, addNestedCondition, allEq, allEq, and, and, appendSqlSegments, apply, between, clone, columnsToString, columnToSqlSegment, comment, doGroupBy, doOrderBy, eq, exists, first, formatParam, formatSqlMaybeWithParam, func, ge, geSql, getEntity, getEntityClass, getExpression, getParamAlias, getParamNameValuePairs, getSqlComment, getSqlFirst, getSqlSegment, groupBy, groupBy, gt, gtSql, having, in, in, 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, or, or, orderBy, orderBy, orderBy, setEntity, setEntityClass, setParamAliasgetCustomSqlSegment, getSqlSet, getTargetSql, isEmptyOfEntity, isEmptyOfNormal, isEmptyOfWhere, isNonEmptyOfEntity, isNonEmptyOfNormal, isNonEmptyOfWhere, nonEmptyOfEntity, nonEmptyOfNormal, nonEmptyOfWhereequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitallEq, allEq, allEq, allEq, between, eq, ge, gt, le, like, likeLeft, likeRight, lt, ne, notBetween, notLike, notLikeLeft, notLikeRightapply, comment, exists, first, last, notExists, orfunc, geSql, groupBy, groupBy, gtSql, having, in, in, inSql, isNotNull, isNull, leSql, ltSql, notIn, notIn, notInSql, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDescpublic LambdaTreeWrapper(T entity, com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?> id, com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?> parentId)
public LambdaTreeWrapper<T> select(boolean condition, List<com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>> columns)
select 在接口中 com.baomidou.mybatisplus.core.conditions.query.Query<LambdaTreeWrapper<T>,T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>>condition - 执行条件columns - 字段列表@SafeVarargs public final LambdaTreeWrapper<T> select(com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>... columns)
select 在接口中 com.baomidou.mybatisplus.core.conditions.query.Query<LambdaTreeWrapper<T>,T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>>columns - 查询字段public LambdaTreeWrapper<T> select(Class<T> entityClass, Predicate<com.baomidou.mybatisplus.core.metadata.TableFieldInfo> predicate)
例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 在接口中 com.baomidou.mybatisplus.core.conditions.query.Query<LambdaTreeWrapper<T>,T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>>predicate - 过滤方式public LambdaTreeWrapper<T> lazy(Object parentIdValue)
public String getSqlSelect()
getSqlSelect 在接口中 com.baomidou.mybatisplus.core.conditions.query.Query<LambdaTreeWrapper<T>,T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>>getSqlSelect 在类中 com.baomidou.mybatisplus.core.conditions.Wrapper<T>protected LambdaTreeWrapper<T> instance()
故 sqlSelect 不向下传递
instance 在类中 com.baomidou.mybatisplus.core.conditions.AbstractWrapper<T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>,LambdaTreeWrapper<T>>public TreeWrapper<T> unLambda()
public void clear()
clear 在类中 com.baomidou.mybatisplus.core.conditions.AbstractWrapper<T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>,LambdaTreeWrapper<T>>Copyright © 2024. All rights reserved.