public class KtLambdaWrapper<T> extends KtAbstractLambdaWrapper<T,KtLambdaWrapper<T>> implements Query<KtLambdaWrapper<T>>, QueryLabel<KtLambdaWrapper<T>>, Chain<T>, SelectWrapper<T,KtLambdaWrapper<T>>
LambdaQueryWrapper
Lambda 语法使用 WrapperKtAbstractWrapper.DoSomethingalias, dynamicTableName, from, hasAlias, keyWord, logicDelType, logicSql, resultMap, subLogicSql, subTableAlias, tableFunc, tableIndexcheckSqlInjection, expression, ifAbsent, index, isMain, isNo, joinClass, lastSql, onWrappers, paramAlias, paramNameSeq, paramNameValuePairs, sqlComment, sqlFirst, tableList, tableName, typedThis| 构造器和说明 |
|---|
KtLambdaWrapper()
推荐使用 带 class 的构造方法
|
KtLambdaWrapper(Class<T> clazz)
推荐使用此构造方法
|
KtLambdaWrapper(Class<T> clazz,
String alias)
构造方法
|
KtLambdaWrapper(String alias)
自定义主表别名
|
KtLambdaWrapper(T entity)
构造方法
|
KtLambdaWrapper(T entity,
String alias)
构造方法
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addLabel(Label<?> label) |
void |
clear() |
KtLambdaWrapper<T> |
distinct()
sql去重
select distinct
|
KtLambdaWrapper<T> |
getChildren() |
List<Select> |
getSelectColum() |
boolean |
getSelectDistinct() |
String |
getSqlSelect()
查询条件 SQL 片段
|
String |
getUnionSql() |
protected KtLambdaWrapper<T> |
instance()
用于生成嵌套 sql
故 sqlSelect 不向下传递
|
protected KtLambdaWrapper<T> |
instance(Integer index,
String keyWord,
Class<?> joinClass,
String tableName) |
protected KtLambdaWrapper<T> |
instanceEmpty() |
KtLambdaWrapper<T> |
select(kotlin.reflect.KProperty<?>... columns)
设置查询字段
|
KtLambdaWrapper<T> |
selectAll(Class<?> clazz)
查询实体类全部字段
|
KtLambdaWrapper<T> |
selectSub(Class<?> clazz,
java.util.function.Consumer<KtLambdaWrapper<?>> consumer,
kotlin.reflect.KProperty<?> alias)
子查询
|
KtLambdaWrapper<T> |
selectSub(Class<?> clazz,
String st,
java.util.function.Consumer<KtLambdaWrapper<?>> consumer,
kotlin.reflect.KProperty<?> alias)
子查询
|
<U> KtLambdaWrapper<T> |
union(Class<U> clazz,
java.util.function.Consumer<KtLambdaWrapper<U>> consumer)
union
例: wrapper.union(UserDO.class, union -> union.selectAll(UserDO.class))
|
KtLambdaWrapper<T> |
union(KtLambdaWrapper<?>... wrappers)
已过时。
union 不支持子查询
|
<U> KtLambdaWrapper<T> |
unionAll(Class<U> clazz,
java.util.function.Consumer<KtLambdaWrapper<U>> consumer)
union
例: wrapper.unionAll(UserDO.class, union -> union.selectAll(UserDO.class))
|
KtLambdaWrapper<T> |
unionAll(KtLambdaWrapper<?>... wrappers)
已过时。
union 不支持子查询
|
columnsToString, columnToString, disableLogicDel, disableSubLogicDel, enableLogicDel, enableSubLogicDel, getCache, getDefault, getFrom, getLogicSql, getSubLogicSql, getTableName, getTableNameEnc, initNeed, isUseAnnotationOrderBy, join, join, logicDelToOn, logicDelToWhere, setTableNameaddCondition, addCondition, addCondition, addNestedCondition, allEq, allEqStr, allEqStr, and, and, appendSqlSegments, apply, between, between, checkSqlInjection, clone, columnSqlInjectFilter, columnsToString, columnsToString, columnsToString, columnToSqlSegment, columnToSqlSegment, columnToSqlSegmentS, columnToString, comment, eq, eq, eq, exists, first, formatParam, formatSqlMaybeWithParam, func, ge, ge, ge, geSql, geSql, getEntity, getEntityClass, getExpression, getParamAlias, getSqlComment, getSqlFirst, getSqlSegment, groupBy, groupBy, groupBy, groupBy, groupByStr, gt, gt, gt, gtSql, gtSql, having, in, in, in, in, inExpression, inExpression, inSql, inSql, isNotNull, isNotNull, isNull, isNull, last, le, le, le, leSql, leSql, like, like, likeLeft, likeLeft, likeRight, likeRight, likeValue, likeValue, lt, lt, lt, ltSql, ltSql, maybeDo, ne, ne, ne, nested, not, not, notBetween, notBetween, notExists, notIn, notIn, notIn, notIn, notInSql, notInSql, notLike, notLike, notLikeLeft, notLikeLeft, notLikeRight, notLikeRight, or, or, orderBy, orderBy, orderBy, orderByAsc, orderByDesc, orderByStr, setEntity, setEntityClass, setIfAbsent, setIfAbsent, setParamAlias, toChildren, toChildrengetCustomSqlSegment, getSqlSet, getTargetSql, isEmptyOfEntity, isEmptyOfNormal, isEmptyOfWhere, isNonEmptyOfEntity, isNonEmptyOfNormal, isNonEmptyOfWhere, nonEmptyOfEntity, nonEmptyOfNormal, nonEmptyOfWhereequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAlias, getIndex, isHasAlias, select, select, selectAll, selectAs, selectAs, selectAs, selectAs, selectAsClass, selectAvg, selectAvg, selectAvg, selectCount, selectCount, selectCount, selectCount, selectCount, selectFilter, selectFunc, selectFunc, selectFunc, selectFunc, selectFunc, selectFunc, selectFunc, selectLen, selectLen, selectLen, selectMax, selectMax, selectMax, selectMin, selectMin, selectMin, selectSum, selectSum, selectSumselectAssociation, selectAssociation, selectAssociation, selectAssociation, selectAssociation, selectCollection, selectCollection, selectCollection, selectCollection, selectCollectioncount, first, first, getEntityClass, list, list, one, one, page, pagegetEntityClass, getResultMapMybatisLabel, getSelectColumns, isResultMap, setEntityClassfullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, join, join, join, join, join, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoinfullJoin, fullJoin, innerJoin, innerJoin, leftJoin, leftJoin, rightJoin, rightJoingetDeleteLogicSql, getDeleteSqleqIfAbsent, eqIfAbsent, geIfAbsent, geIfAbsent, getIfAbsent, gtIfAbsent, gtIfAbsent, leIfAbsent, leIfAbsent, likeIfAbsent, likeIfAbsent, likeLeftIfAbsent, likeLeftIfAbsent, likeRightIfAbsent, likeRightIfAbsent, ltIfAbsent, ltIfAbsent, neIfAbsent, neIfAbsent, notLikeIfAbsent, notLikeIfAbsent, notLikeLeftIfAbsent, notLikeLeftIfAbsent, notLikeRightIfAbsent, notLikeRightIfAbsentallEq, allEq, between, between, between, eq, eq, eq, ge, ge, ge, gt, gt, gt, le, le, le, like, like, like, likeLeft, likeLeft, likeLeft, likeRight, likeRight, likeRight, lt, lt, lt, ne, ne, ne, notBetween, notBetween, notBetween, notLike, notLike, notLike, notLikeLeft, notLikeLeft, notLikeLeft, notLikeRight, notLikeRight, notLikeRightapply, comment, exists, first, last, notExists, orfunc, geSql, geSql, geSql, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, gtSql, gtSql, gtSql, having, in, in, in, in, in, in, inSql, inSql, inSql, isNotNull, isNotNull, isNotNull, isNull, isNull, isNull, leSql, leSql, leSql, ltSql, ltSql, ltSql, notIn, notIn, notIn, notIn, notIn, notIn, notInSql, notInSql, notInSql, orderBy, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDesceq, eq, eq, eq, eq, eq, eq, ge, ge, ge, ge, ge, ge, ge, gt, gt, gt, gt, gt, gt, gt, le, le, le, le, le, le, le, lt, lt, lt, lt, lt, lt, lt, ne, ne, ne, ne, ne, ne, neeqIfAbsent, geIfAbsent, getIfAbsent, gtIfAbsent, leIfAbsent, likeIfAbsent, likeLeftIfAbsent, likeRightIfAbsent, ltIfAbsent, neIfAbsent, notLikeIfAbsent, notLikeLeftIfAbsent, notLikeRightIfAbsentallEqStr, allEqStr, allEqStr, allEqStr, between, eq, ge, gt, le, like, likeLeft, likeRight, lt, ne, notBetween, notLike, notLikeLeft, notLikeRightgeSql, groupBy, groupBy, groupByStr, gtSql, in, in, inSql, isNotNull, isNull, leSql, ltSql, notIn, notIn, notInSql, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAscStr, orderByAscStr, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDescStr, orderByDescStrpublic KtLambdaWrapper()
public KtLambdaWrapper(T entity)
entity - 主表实体public KtLambdaWrapper(String alias)
public KtLambdaWrapper(Class<T> clazz, String alias)
clazz - 主表class类alias - 主表别名public KtLambdaWrapper<T> distinct()
public List<Select> getSelectColum()
getSelectColum 在接口中 Query<KtLambdaWrapper<T>>public void addLabel(Label<?> label)
addLabel 在接口中 QueryLabel<KtLambdaWrapper<T>>public KtLambdaWrapper<T> getChildren()
getChildren 在接口中 Query<KtLambdaWrapper<T>>getChildren 在接口中 QueryLabel<KtLambdaWrapper<T>>public final KtLambdaWrapper<T> select(kotlin.reflect.KProperty<?>... columns)
select 在接口中 Query<KtLambdaWrapper<T>>columns - 字段数组public KtLambdaWrapper<T> selectAll(Class<?> clazz)
QueryselectAll 在接口中 Query<KtLambdaWrapper<T>>selectAll 在接口中 SelectWrapper<T,KtLambdaWrapper<T>>public KtLambdaWrapper<T> selectSub(Class<?> clazz, java.util.function.Consumer<KtLambdaWrapper<?>> consumer, kotlin.reflect.KProperty<?> alias)
public KtLambdaWrapper<T> selectSub(Class<?> clazz, String st, java.util.function.Consumer<KtLambdaWrapper<?>> consumer, kotlin.reflect.KProperty<?> alias)
@Deprecated public final KtLambdaWrapper<T> union(KtLambdaWrapper<?>... wrappers)
推荐使用 union(Class clazz, Consumer
union(Class, Consumer)public <U> KtLambdaWrapper<T> union(Class<U> clazz, java.util.function.Consumer<KtLambdaWrapper<U>> consumer)
例: wrapper.union(UserDO.class, union -> union.selectAll(UserDO.class))
clazz - union语句的主表类型@Deprecated public final KtLambdaWrapper<T> unionAll(KtLambdaWrapper<?>... wrappers)
推荐使用 unionAll(Class clazz, Consumer
public <U> KtLambdaWrapper<T> unionAll(Class<U> clazz, java.util.function.Consumer<KtLambdaWrapper<U>> consumer)
例: wrapper.unionAll(UserDO.class, union -> union.selectAll(UserDO.class))
clazz - union语句的主表类型public String getSqlSelect()
getSqlSelect 在接口中 Query<KtLambdaWrapper<T>>getSqlSelect 在类中 com.baomidou.mybatisplus.core.conditions.Wrapper<T>public String getUnionSql()
getUnionSql 在接口中 MPJBaseJoin<T>public boolean getSelectDistinct()
protected KtLambdaWrapper<T> instance()
故 sqlSelect 不向下传递
instance 在类中 KtAbstractWrapper<T,KtLambdaWrapper<T>>protected KtLambdaWrapper<T> instanceEmpty()
instanceEmpty 在类中 KtAbstractWrapper<T,KtLambdaWrapper<T>>protected KtLambdaWrapper<T> instance(Integer index, String keyWord, Class<?> joinClass, String tableName)
instance 在类中 KtAbstractWrapper<T,KtLambdaWrapper<T>>public void clear()
clear 在类中 KtAbstractLambdaWrapper<T,KtLambdaWrapper<T>>Copyright © 2023. All rights reserved.