接口 Func<Children,​R>

所有超级接口:
Serializable
所有已知实现类:
AbstractLambdaWrapper, AbstractWrapper, LambdaQueryWrapper, LambdaUpdateWrapper, QueryWrapper, UpdateWrapper

public interface Func<Children,​R>
extends Serializable
查询条件封装
从以下版本开始:
2017-05-26
作者:
hubin miemie HCL
  • 方法详细资料

    • isNull

      default Children isNull​(R column)
      ignore
    • isNull

      Children isNull​(boolean condition, R column)
      字段 IS NULL

      例: isNull("name")

      参数:
      condition - 执行条件
      column - 字段
      返回:
      children
    • isNotNull

      default Children isNotNull​(R column)
      ignore
    • isNotNull

      Children isNotNull​(boolean condition, R column)
      字段 IS NOT NULL

      例: isNotNull("name")

      参数:
      condition - 执行条件
      column - 字段
      返回:
      children
    • in

      default Children in​(R column, Collection<?> coll)
      ignore
    • in

      Children in​(boolean condition, R column, Collection<?> coll)
      字段 IN (value.get(0), value.get(1), ...)

      例: in("id", Arrays.asList(1, 2, 3, 4, 5))

    • 如果集合为 empty 则不会进行 sql 拼接
    • 参数:
      condition - 执行条件
      column - 字段
      coll - 数据集合
      返回:
      children
    • in

      default Children in​(R column, Object... values)
      ignore
    • in

      default Children in​(boolean condition, R column, Object... values)
      字段 IN (v0, v1, ...)

      例: in("id", 1, 2, 3, 4, 5)

    • 如果动态数组为 empty 则不会进行 sql 拼接
    • 参数:
      condition - 执行条件
      column - 字段
      values - 数据数组
      返回:
      children
    • notIn

      default Children notIn​(R column, Collection<?> coll)
      ignore
    • notIn

      Children notIn​(boolean condition, R column, Collection<?> coll)
      字段 NOT IN (value.get(0), value.get(1), ...)

      例: notIn("id", Arrays.asList(1, 2, 3, 4, 5))

      参数:
      condition - 执行条件
      column - 字段
      coll - 数据集合
      返回:
      children
    • notIn

      default Children notIn​(R column, Object... value)
      ignore
    • notIn

      default Children notIn​(boolean condition, R column, Object... values)
      字段 NOT IN (v0, v1, ...)

      例: notIn("id", 1, 2, 3, 4, 5)

      参数:
      condition - 执行条件
      column - 字段
      values - 数据数组
      返回:
      children
    • inSql

      default Children inSql​(R column, String inValue)
      ignore
    • inSql

      Children inSql​(boolean condition, R column, String inValue)
      字段 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

      default Children notInSql​(R column, String inValue)
      ignore
    • notInSql

      Children notInSql​(boolean condition, R column, String inValue)
      字段 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

      default Children groupBy​(R column)
      ignore
    • groupBy

      default Children groupBy​(R... columns)
      ignore
    • groupBy

      Children groupBy​(boolean condition, R... columns)
      分组:GROUP BY 字段, ...

      例: groupBy("id", "name")

      参数:
      condition - 执行条件
      columns - 字段数组
      返回:
      children
    • orderByAsc

      default Children orderByAsc​(R column)
      ignore
    • orderByAsc

      default Children orderByAsc​(R... columns)
      ignore
    • orderByAsc

      default Children orderByAsc​(boolean condition, R... columns)
      排序:ORDER BY 字段, ... ASC

      例: orderByAsc("id", "name")

      参数:
      condition - 执行条件
      columns - 字段数组
      返回:
      children
    • orderByDesc

      default Children orderByDesc​(R column)
      ignore
    • orderByDesc

      default Children orderByDesc​(R... columns)
      ignore
    • orderByDesc

      default Children orderByDesc​(boolean condition, R... columns)
      排序:ORDER BY 字段, ... DESC

      例: orderByDesc("id", "name")

      参数:
      condition - 执行条件
      columns - 字段数组
      返回:
      children
    • orderBy

      Children orderBy​(boolean condition, boolean isAsc, R... columns)
      排序:ORDER BY 字段, ...

      例: orderBy(true, "id", "name")

      参数:
      condition - 执行条件
      isAsc - 是否是 ASC 排序
      columns - 字段数组
      返回:
      children
    • having

      default Children having​(String sqlHaving, Object... params)
      ignore
    • having

      Children having​(boolean condition, String sqlHaving, Object... params)
      HAVING ( sql语句 )

      例1: having("sum(age) > 10")

      例2: having("sum(age) > {0}", 10)

      参数:
      condition - 执行条件
      sqlHaving - sql 语句
      params - 参数数组
      返回:
      children
    • func

      default Children func​(Consumer<Children> consumer)
      ignore
    • func

      Children func​(boolean condition, Consumer<Children> consumer)
      消费函数
      参数:
      consumer - 消费函数
      返回:
      children
      从以下版本开始:
      3.3.1