com.github.yulichang.wrapper.interfaces.OnCompare Maven / Gradle / Ivy
Show all versions of mybatis-plus-join-core Show documentation
package com.github.yulichang.wrapper.interfaces;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import java.io.Serializable;
/**
* 将原来的泛型R改成SFunction, Object改为SFunction
* 以及移除不会在ON语句中出现的条件 比如like相关 保留原来的like 只是不太可能会出现 on a.id like b.id 所以不会支持这种写法
*
* {@link com.baomidou.mybatisplus.core.conditions.interfaces.Compare}
*
* @since 1.1.8
*/
@SuppressWarnings("unused")
public interface OnCompare extends Serializable {
default Children eq(SFunction column, SFunction val) {
return eq(true, column, val);
}
default Children eq(String alias, SFunction column, SFunction val) {
return eq(true, alias, column, val);
}
default Children eq(SFunction column, String rightAlias, SFunction val) {
return eq(true, column, rightAlias, val);
}
default Children eq(String alias, SFunction column, String rightAlias, SFunction val) {
return eq(true, alias, column, rightAlias, val);
}
default Children eq(boolean condition, SFunction column, SFunction val) {
return eq(condition, null, column, null, val);
}
default Children eq(boolean condition, String alias, SFunction column, SFunction val) {
return eq(condition, alias, column, null, val);
}
default Children eq(boolean condition, SFunction column, String rightAlias, SFunction val) {
return eq(condition, null, column, rightAlias, val);
}
/**
* 等于 =
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children eq(boolean condition, String alias, SFunction column, String rightAlias, SFunction val);
default Children ne(SFunction column, SFunction val) {
return ne(true, null, column, null, val);
}
default Children ne(String alias, SFunction column, SFunction val) {
return ne(true, alias, column, null, val);
}
default Children ne(SFunction column, String rightAlias, SFunction val) {
return ne(true, null, column, rightAlias, val);
}
default Children ne(String alias, SFunction column, String rightAlias, SFunction val) {
return ne(true, alias, column, rightAlias, val);
}
default Children ne(boolean condition, SFunction column, SFunction val) {
return ne(condition, null, column, null, val);
}
default Children ne(boolean condition, String alias, SFunction column, SFunction val) {
return ne(condition, alias, column, null, val);
}
default Children ne(boolean condition, SFunction column, String rightAlias, SFunction val) {
return ne(condition, null, column, rightAlias, val);
}
/**
* 不等于 <>
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children ne(boolean condition, String alias, SFunction column, String rightAlias, SFunction val);
default Children gt(SFunction column, SFunction val) {
return gt(true, null, column, null, val);
}
default Children gt(String alias, SFunction column, SFunction val) {
return gt(true, alias, column, null, val);
}
default Children gt(SFunction column, String rightAlias, SFunction val) {
return gt(true, null, column, rightAlias, val);
}
default Children gt(String alias, SFunction column, String rightAlias, SFunction val) {
return gt(true, alias, column, rightAlias, val);
}
default Children gt(boolean condition, SFunction column, SFunction val) {
return gt(condition, null, column, null, val);
}
default Children gt(boolean condition, String alias, SFunction column, SFunction val) {
return gt(condition, alias, column, null, val);
}
default Children gt(boolean condition, SFunction column, String rightAlias, SFunction val) {
return gt(condition, null, column, rightAlias, val);
}
/**
* 大于 >
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children gt(boolean condition, String alias, SFunction column, String rightAlias, SFunction val);
default Children ge(SFunction column, SFunction val) {
return ge(true, null, column, null, val);
}
default Children ge(String alias, SFunction column, SFunction val) {
return ge(true, alias, column, null, val);
}
default Children ge(SFunction column, String rightAlias, SFunction val) {
return ge(true, null, column, rightAlias, val);
}
default Children ge(String alias, SFunction column, String rightAlias, SFunction val) {
return ge(true, alias, column, rightAlias, val);
}
default Children ge(boolean condition, SFunction column, SFunction val) {
return ge(condition, null, column, null, val);
}
default Children ge(boolean condition, String alias, SFunction column, SFunction val) {
return ge(condition, alias, column, null, val);
}
default Children ge(boolean condition, SFunction column, String rightAlias, SFunction val) {
return ge(condition, null, column, rightAlias, val);
}
/**
* 大于等于 >=
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children ge(boolean condition, String alias, SFunction column, String rightAlias, SFunction val);
default Children lt(SFunction column, SFunction val) {
return lt(true, null, column, null, val);
}
default Children lt(String alias, SFunction column, SFunction val) {
return lt(true, alias, column, null, val);
}
default Children lt(SFunction column, String rightAlias, SFunction val) {
return lt(true, null, column, rightAlias, val);
}
default Children lt(String alias, SFunction column, String rightAlias, SFunction val) {
return lt(true, alias, column, rightAlias, val);
}
default Children lt(boolean condition, SFunction column, SFunction val) {
return lt(condition, null, column, null, val);
}
default Children lt(boolean condition, String alias, SFunction column, SFunction val) {
return lt(condition, alias, column, null, val);
}
default Children lt(boolean condition, SFunction column, String rightAlias, SFunction val) {
return lt(condition, null, column, rightAlias, val);
}
/**
* 小于 <
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children lt(boolean condition, String alias, SFunction column, String rightAlias, SFunction val);
default Children le(SFunction column, SFunction val) {
return le(true, null, column, null, val);
}
default Children le(String alias, SFunction column, SFunction val) {
return le(true, alias, column, null, val);
}
default Children le(SFunction column, String rightAlias, SFunction val) {
return le(true, null, column, rightAlias, val);
}
default Children le(String alias, SFunction column, String rightAlias, SFunction val) {
return le(true, alias, column, rightAlias, val);
}
default Children le(boolean condition, SFunction column, SFunction val) {
return le(condition, null, column, null, val);
}
default Children le(boolean condition, String alias, SFunction column, SFunction val) {
return le(condition, alias, column, null, val);
}
default Children le(boolean condition, SFunction column, String rightAlias, SFunction val) {
return le(condition, null, column, rightAlias, val);
}
/**
* 小于等于 <=
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children le(boolean condition, String alias, SFunction column, String rightAlias, SFunction val);
}