类 QueryWrap<T>
- 所有已实现的接口:
com.baomidou.mybatisplus.core.conditions.interfaces.Compare<QueryWrap<T>,,String> com.baomidou.mybatisplus.core.conditions.interfaces.Func<QueryWrap<T>,,String> com.baomidou.mybatisplus.core.conditions.interfaces.Join<QueryWrap<T>>,com.baomidou.mybatisplus.core.conditions.interfaces.Nested<QueryWrap<T>,,QueryWrap<T>> com.baomidou.mybatisplus.core.conditions.ISqlSegment,com.baomidou.mybatisplus.core.conditions.query.Query<QueryWrap<T>,,T, String> Serializable
public class QueryWrap<T>
extends com.baomidou.mybatisplus.core.conditions.AbstractWrapper<T,String,QueryWrap<T>>
implements com.baomidou.mybatisplus.core.conditions.query.Query<QueryWrap<T>,T,String>
Entity 对象封装操作类
相比 QueryWrapper 的增强如下: 1,new QueryWrapper(T entity)时, 对entity 中的string字段 %和_ 符号进行转义,便于模糊查询 2,对like方法的参数 %和_ 符号进行转义,便于模糊查询 3,对nested、eq、ne、gt、ge、lt、le、in、like 等方法 进行条件判断,null 或 "" 字段不加入查询 4,增加 leFooter 方法, 将日期参数值,强制转换成当天 23:59:59 5,增加 geHeader 方法, 将日期参数值,强制转换成当天 00:00:00
- 从以下版本开始:
- 2018-05-25
- 作者:
- hubin miemie HCL
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 com.baomidou.mybatisplus.core.conditions.AbstractWrapper
com.baomidou.mybatisplus.core.conditions.AbstractWrapper.DoSomething -
字段概要
从类继承的字段 com.baomidou.mybatisplus.core.conditions.AbstractWrapper
expression, lastSql, paramAlias, paramNameSeq, paramNameValuePairs, sqlComment, sqlFirst, typedThis -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明取消跳过空的字符串 不允许跳过空的字符串开启检查 SQL 注入voidclear()protected StringcolumnToString(String column) geHeader(String column, LocalDateTime val) ignore(BiFunction<T, A, ?> setColumn) 忽略实体中的某些字段,实体中的字段默认是会除了null以外的全部进行等值匹配 再次可以进行忽略in(String column, Collection<?> coll) instance()用于生成嵌套 sqllambda()返回一个支持 lambda 函数写法的 wrapperleFooter(String column, LocalDateTime val) notBetween(String column, Object val1, Object val2) select(Class<T> entityClass, Predicate<com.baomidou.mybatisplus.core.metadata.TableFieldInfo> predicate) 从类继承的方法 com.baomidou.mybatisplus.core.conditions.AbstractWrapper
addCondition, addNestedCondition, allEq, allEq, and, and, appendSqlSegments, apply, between, clone, columnsToString, columnsToString, columnToSqlSegment, comment, doGroupBy, doOrderBy, eq, eqSql, exists, first, formatParam, formatSqlMaybeWithParam, func, ge, geSql, getEntity, getEntityClass, getExpression, getParamAlias, getParamNameValuePairs, getSqlComment, getSqlFirst, getSqlSegment, groupBy, groupBy, 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, orderBy, setEntity, setEntityClass, setParamAlias从类继承的方法 com.baomidou.mybatisplus.core.conditions.Wrapper
getCustomSqlSegment, getSqlSet, getTargetSql, isEmptyOfEntity, isEmptyOfNormal, isEmptyOfWhere, isNonEmptyOfEntity, isNonEmptyOfNormal, isNonEmptyOfWhere, 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, notLikeLeft, notLikeRight从接口继承的方法 com.baomidou.mybatisplus.core.conditions.interfaces.Func
eqSql, func, geSql, groupBy, groupBy, groupBy, gtSql, having, inSql, isNotNull, isNull, leSql, ltSql, notIn, notIn, notInSql, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDesc从接口继承的方法 com.baomidou.mybatisplus.core.conditions.interfaces.Join
apply, comment, exists, first, last, notExists, or从接口继承的方法 com.baomidou.mybatisplus.core.conditions.interfaces.Nested
and, not, or从接口继承的方法 com.baomidou.mybatisplus.core.conditions.query.Query
select, select, select, select
-
构造器详细资料
-
QueryWrap
-
QueryWrap
public QueryWrap() -
QueryWrap
-
QueryWrap
-
-
方法详细资料
-
checkSqlInjection
开启检查 SQL 注入 -
columnToString
-
select
-
select
-
getSqlSelect
-
lambda
返回一个支持 lambda 函数写法的 wrapper -
instance
用于生成嵌套 sql故 sqlSelect 不向下传递
-
clear
public void clear() -
nested
-
eq
-
ne
-
gt
-
ge
-
geHeader
-
geHeader
-
lt
-
le
-
between
-
notBetween
-
like
-
notLike
-
likeLeft
-
likeRight
-
in
-
in
-
cancelSkipEmpty
取消跳过空的字符串 不允许跳过空的字符串- 返回:
- 自己
-
ignore
忽略实体中的某些字段,实体中的字段默认是会除了null以外的全部进行等值匹配 再次可以进行忽略- 参数:
setColumn- 这个是传入的待忽略字段的set方法- 返回:
- 自己
-