接口 Join<Children>
- 所有超级接口:
Serializable
- 所有已知实现类:
AbstractLambdaWrapper,AbstractWrapper,LambdaQueryWrapper,LambdaUpdateWrapper,QueryWrapper,UpdateWrapper
public interface Join<Children> extends Serializable
查询条件封装
拼接
- 从以下版本开始:
- 2017-05-26
- 作者:
- hubin miemie HCL
-
方法概要
修饰符和类型 方法 说明 Childrenapply(boolean condition, String applySql, Object... value)拼接 sqldefault Childrenapply(String applySql, Object... value)ignoreChildrencomment(boolean condition, String comment)sql 注释(会拼接在 sql 的最后面)default Childrencomment(String comment)ignoreChildrenexists(boolean condition, String existsSql)拼接 EXISTS ( sql语句 )default Childrenexists(String existsSql)ignoreChildrenfirst(boolean condition, String firstSql)sql 起始句(会拼接在SQL语句的起始处)default Childrenfirst(String firstSql)ignoreChildrenlast(boolean condition, String lastSql)无视优化规则直接拼接到 sql 的最后(有sql注入的风险,请谨慎使用)default Childrenlast(String lastSql)ignoreChildrennotExists(boolean condition, String existsSql)拼接 NOT EXISTS ( sql语句 )default ChildrennotExists(String existsSql)ignoredefault Childrenor()ignoreChildrenor(boolean condition)拼接 OR
-
方法详细资料
-
or
ignore -
or
拼接 OR- 参数:
condition- 执行条件- 返回:
- children
-
apply
ignore -
apply
拼接 sql!! 会有 sql 注入风险 !!
例1: apply("id = 1")
例2: apply("date_format(dateColumn,'%Y-%m-%d') = '2008-08-08'")
例3: apply("date_format(dateColumn,'%Y-%m-%d') = {0}", LocalDate.now())
- 参数:
condition- 执行条件- 返回:
- children
-
last
ignore -
last
无视优化规则直接拼接到 sql 的最后(有sql注入的风险,请谨慎使用)例: last("limit 1")
注意只能调用一次,多次调用以最后一次为准
- 参数:
condition- 执行条件lastSql- sql语句- 返回:
- children
-
comment
ignore -
comment
sql 注释(会拼接在 sql 的最后面)- 参数:
condition- 执行条件comment- sql注释- 返回:
- children
-
first
ignore -
first
sql 起始句(会拼接在SQL语句的起始处)- 参数:
condition- 执行条件firstSql- 起始语句- 返回:
- children
- 从以下版本开始:
- 3.3.1
-
exists
ignore -
exists
拼接 EXISTS ( sql语句 )!! sql 注入方法 !!
例: exists("select id from table where age = 1")
- 参数:
condition- 执行条件existsSql- sql语句- 返回:
- children
-
notExists
ignore -
notExists
拼接 NOT EXISTS ( sql语句 )!! sql 注入方法 !!
例: notExists("select id from table where age = 1")
- 参数:
condition- 执行条件existsSql- sql语句- 返回:
- children
-