接口 Func<Children,R>
- 所有超级接口:
Serializable
- 所有已知实现类:
AbstractLambdaWrapper,AbstractWrapper,LambdaQueryWrapper,LambdaUpdateWrapper,QueryWrapper,UpdateWrapper
public interface Func<Children,R> extends Serializable
查询条件封装
- 从以下版本开始:
- 2017-05-26
- 作者:
- hubin miemie HCL
-
方法概要
修饰符和类型 方法 说明 Childrenfunc(boolean condition, Consumer<Children> consumer)消费函数default Childrenfunc(Consumer<Children> consumer)ignoreChildrengroupBy(boolean condition, R... columns)分组:GROUP BY 字段, ...default ChildrengroupBy(R column)ignoredefault ChildrengroupBy(R... columns)ignoreChildrenhaving(boolean condition, String sqlHaving, Object... params)HAVING ( sql语句 )default Childrenhaving(String sqlHaving, Object... params)ignoredefault Childrenin(boolean condition, R column, Object... values)字段 IN (v0, v1, ...)Childrenin(boolean condition, R column, Collection<?> coll)字段 IN (value.get(0), value.get(1), ...)default Childrenin(R column, Object... values)ignoredefault Childrenin(R column, Collection<?> coll)ignoreChildreninSql(boolean condition, R column, String inValue)字段 IN ( sql语句 )default ChildreninSql(R column, String inValue)ignoreChildrenisNotNull(boolean condition, R column)字段 IS NOT NULLdefault ChildrenisNotNull(R column)ignoreChildrenisNull(boolean condition, R column)字段 IS NULLdefault ChildrenisNull(R column)ignoredefault ChildrennotIn(boolean condition, R column, Object... values)字段 NOT IN (v0, v1, ...)ChildrennotIn(boolean condition, R column, Collection<?> coll)字段 NOT IN (value.get(0), value.get(1), ...)default ChildrennotIn(R column, Object... value)ignoredefault ChildrennotIn(R column, Collection<?> coll)ignoreChildrennotInSql(boolean condition, R column, String inValue)字段 NOT IN ( sql语句 )default ChildrennotInSql(R column, String inValue)ignoreChildrenorderBy(boolean condition, boolean isAsc, R... columns)排序:ORDER BY 字段, ...default ChildrenorderByAsc(boolean condition, R... columns)排序:ORDER BY 字段, ...default ChildrenorderByAsc(R column)ignoredefault ChildrenorderByAsc(R... columns)ignoredefault ChildrenorderByDesc(boolean condition, R... columns)排序:ORDER BY 字段, ...default ChildrenorderByDesc(R column)ignoredefault ChildrenorderByDesc(R... columns)ignore
-
方法详细资料
-
isNull
ignore -
isNull
字段 IS NULL例: isNull("name")
- 参数:
condition- 执行条件column- 字段- 返回:
- children
-
isNotNull
ignore -
isNotNull
字段 IS NOT NULL例: isNotNull("name")
- 参数:
condition- 执行条件column- 字段- 返回:
- children
-
in
ignore -
in
字段 IN (value.get(0), value.get(1), ...)例: in("id", Arrays.asList(1, 2, 3, 4, 5))
- 如果集合为 empty 则不会进行 sql 拼接
- 参数:
condition- 执行条件column- 字段coll- 数据集合- 返回:
- children
-
in
ignore -
in
字段 IN (v0, v1, ...)例: in("id", 1, 2, 3, 4, 5)
- 如果动态数组为 empty 则不会进行 sql 拼接
- 参数:
condition- 执行条件column- 字段values- 数据数组- 返回:
- children
-
notIn
ignore -
notIn
字段 NOT IN (value.get(0), value.get(1), ...)例: notIn("id", Arrays.asList(1, 2, 3, 4, 5))
- 参数:
condition- 执行条件column- 字段coll- 数据集合- 返回:
- children
-
notIn
ignore -
notIn
字段 NOT IN (v0, v1, ...)例: notIn("id", 1, 2, 3, 4, 5)
- 参数:
condition- 执行条件column- 字段values- 数据数组- 返回:
- children
-
inSql
ignore -
inSql
字段 IN ( sql语句 )!! sql 注入方式的 in 方法 !!
例1: inSql("id", "1, 2, 3, 4, 5, 6")
例2: inSql("id", "select id from table where id < 3")
- 参数:
condition- 执行条件column- 字段inValue- sql语句- 返回:
- children
-
notInSql
ignore -
notInSql
字段 NOT IN ( sql语句 )!! sql 注入方式的 not in 方法 !!
例1: notInSql("id", "1, 2, 3, 4, 5, 6")
例2: notInSql("id", "select id from table where id < 3")
- 参数:
condition- 执行条件column- 字段inValue- sql语句 ---> 1,2,3,4,5,6 或者 select id from table where id < 3- 返回:
- children
-
groupBy
ignore -
groupBy
ignore -
groupBy
分组:GROUP BY 字段, ...例: groupBy("id", "name")
- 参数:
condition- 执行条件columns- 字段数组- 返回:
- children
-
orderByAsc
ignore -
orderByAsc
ignore -
orderByAsc
排序:ORDER BY 字段, ... ASC例: orderByAsc("id", "name")
- 参数:
condition- 执行条件columns- 字段数组- 返回:
- children
-
orderByDesc
ignore -
orderByDesc
ignore -
orderByDesc
排序:ORDER BY 字段, ... DESC例: orderByDesc("id", "name")
- 参数:
condition- 执行条件columns- 字段数组- 返回:
- children
-
orderBy
排序:ORDER BY 字段, ...例: orderBy(true, "id", "name")
- 参数:
condition- 执行条件isAsc- 是否是 ASC 排序columns- 字段数组- 返回:
- children
-
having
ignore -
having
HAVING ( sql语句 )例1: having("sum(age) > 10")
例2: having("sum(age) > {0}", 10)
- 参数:
condition- 执行条件sqlHaving- sql 语句params- 参数数组- 返回:
- children
-
func
ignore -
func
消费函数- 参数:
consumer- 消费函数- 返回:
- children
- 从以下版本开始:
- 3.3.1
-