public final class Methods extends Object
| 构造器和说明 |
|---|
Methods() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Abs |
abs(Cmd key)
abs绝对值 函数
|
static Acos |
acos(Cmd key)
求反余弦值 函数
|
static Asin |
asin(Cmd key)
求反正弦值 函数
|
static Atan |
atan(Cmd key)
求反正切值 函数
|
static Avg |
avg(Cmd key)
avg平局值 函数
|
static Between |
between(Cmd key,
Serializable value,
Serializable value2)
between 区间判断
|
static Case |
case_()
case 语句块
|
static Ceil |
ceil(Cmd key)
ceil返回大于或等于 x 的最小整数(向上取整) 函数
|
static CharLength |
charLength(Cmd key)
返回字符串的字符数
|
static Cmd |
cmd(Object value)
value
|
static Column |
column(String column) |
static Concat |
concat(Cmd key,
Object... values)
concat拼接 函数
|
static ConcatAs |
concatAs(Cmd key,
String split,
Object... values)
concatAs拼接 函数
|
static Cos |
cos(Cmd key)
求余弦值 函数
|
static Cot |
cot(Cmd key)
求余切值 函数
|
static Count |
count(Cmd key)
count条数 函数
|
static Count |
count(Cmd key,
boolean distinct)
count条数 函数
|
static Count1 |
count1()
count(1) 条数 函数
|
static CountAll |
countAll()
count(*) 条数 函数
|
static CurrentDate |
currentDate()
当前日期
|
static CurrentDateTime |
currentDateTime()
当前时间(包含日期)
|
static CurrentTime |
currentTime()
当前时间(不包含日期)
|
static DateFormat |
date(Cmd key)
获取日期部分,不包含时分秒
|
static DateAdd |
dateAdd(Cmd key,
int n,
TimeUnit timeUnit)
日期增加
|
static DateDiff |
dateDiff(Cmd key,
Cmd another)
日期比较
|
static DateFormat |
dateFormat(Cmd key,
DatePattern pattern)
格式化时间
|
static DateFormat |
dateFormat(Cmd key,
String pattern)
格式化时间
|
static Day |
day(Cmd key)
获取第几天
|
static Degrees |
degrees(Cmd key)
将弧度转换为角度 函数
|
static Divide |
divide(Cmd key,
Cmd value)
divide除法
|
static Divide |
divide(Cmd key,
Number value)
multiply乘法
|
static Empty |
empty(Cmd key)
为空 判断
|
static Eq |
eq(Cmd key,
Object value)
eq等于 判断
|
static Exists |
exists(IQuery query)
exists 一个查询
|
static Exp |
exp(Cmd key)
返回 e 的 key 次方 函数
|
static Floor |
floor(Cmd key)
floor返回小于或等于 x 的最大整数(向下取整) 函数
|
static Gt |
gt(Cmd key,
Object value)
gt大于 判断
|
static Gte |
gte(Cmd key,
Object value)
gte大于等于 判断
|
static Hour |
hour(Cmd key)
获取小时
|
static If |
if_(Condition condition,
Cmd value,
Cmd thenValue)
IF(条件,值1,值2) 函数
|
static If |
if_(Condition condition,
Cmd value,
Serializable thenValue)
if(条件,值1,值2) 函数
|
static If |
if_(Condition condition,
Serializable value,
Cmd thenValue)
if(条件,值1,值2) 函数
|
static If |
if_(Condition condition,
Serializable value,
Serializable thenValue)
if(条件,值1,值2) 函数
|
static IfNull |
ifNull(Cmd key,
Cmd value)
IFNULL(条件,值1,值2) 函数
|
static IfNull |
ifNull(Cmd key,
Serializable value)
IFNULL(条件,值1,值2) 函数
|
static In |
in(Cmd key,
Collection<?> values)
in 多个值
|
static In |
in(Cmd key,
IQuery query)
in 一个查询
|
static In |
in(Cmd key,
Object... values)
in 多个值
|
static InetAton |
inetAton(Cmd key)
将ip转成数字
|
static InetAton |
inetAton(String ip)
将ip转成数字
|
static InetNtoa |
inetNtoa(Cmd key)
将ip数字转成ip
|
static InetNtoa |
inetNtoa(Number ipNumber)
将ip数字转成ip
|
static Instr |
instr(Cmd key,
String str)
返回目标字符(串)在源字符串字符串中出现的起始位置
|
static Eq |
isEmpty(Cmd key)
key列 为空
|
static Ne |
isNotEmpty(Cmd key)
key列 不为空
|
static IsNotNull |
isNotNull(Cmd key)
key列 is NOT NULL
|
static IsNull |
isNull(Cmd key)
key列 is NOT NULL
|
static Left |
left(Cmd key,
int length)
左边截取
|
static Length |
length(Cmd key)
返回字符串的长度 函数
|
static Like |
like(Cmd key,
Object value)
like 判断
|
static Like |
like(LikeMode mode,
Cmd key,
Object value)
like 判断
|
static Object |
likeParamWrap(Cmd key,
Object param,
LikeMode mode,
boolean isNotLike) |
static Log |
log(Cmd key)
返回自然对数(以 e 为底的对数) 函数
|
static Log10 |
log10(Cmd key)
返回以 10 为底的对数 函数
|
static Log2 |
log2(Cmd key)
返回以 2 为底的对数 函数
|
static Lower |
lower(Cmd key)
转换成小写 函数
|
static Lpad |
lpad(Cmd key,
int length,
String pad)
从左边开始填充
|
static Lt |
lt(Cmd key,
Object value)
gt小于 判断
|
static Lte |
lte(Cmd key,
Object value)
gt小于等于 判断
|
static Ltrim |
ltrim(Cmd key)
删除左边空格
|
static Max |
max(Cmd key)
max最大 函数
|
static Min |
min(Cmd key)
min最小 函数
|
static Mod |
mod(Cmd key,
Number number)
mod 取模 函数
|
static Month |
month(Cmd key)
获取月份
|
static Multiply |
multiply(Cmd key,
Cmd value)
multiply乘法
|
static Multiply |
multiply(Cmd key,
Number value)
multiply乘法
|
MysqlFunctions |
mysql(Cmd key) |
static Field |
mysqlFiled(Cmd key,
Object... values)
匹配key 在values里的位置 从1 开始
|
static FindInSet |
mysqlFindInSet(Cmd key,
Number match)
匹配 match 在 key里边的位置
key 需要符合逗号分割规范
|
static FindInSet |
mysqlFindInSet(Cmd key,
String match)
匹配 match 在 key里边的位置
key 需要符合逗号分割规范
|
static FromUnixTime |
mysqlFromUnixTime(Cmd key)
mysql fromUnixTime 函数
|
static JsonContains |
mysqlJsonContains(Cmd key,
Serializable containValue)
mysql fromUnixTime 函数
|
static JsonContains |
mysqlJsonContains(Cmd key,
Serializable containValue,
String path)
mysql json 是否包含值
|
static JsonContainsPath |
mysqlJsonContainsPath(Cmd key,
boolean allMatch,
String... paths)
mysql json 是否包含路径
|
static JsonContainsPath |
mysqlJsonContainsPath(Cmd key,
String... paths)
mysql json 是否包含路径
|
static JsonExtract |
mysqlJsonExtract(Cmd key,
String... paths) |
static Md5 |
mysqlMd5(Cmd key)
md5
|
static Md5 |
mysqlMd5(String str)
md5
|
static Ne |
ne(Cmd key,
Object value)
ne不等于 判断
|
static NotBetween |
notBetween(Cmd key,
Serializable value,
Serializable value2)
not between 区间判断
|
static NotEmpty |
notEmpty(Cmd key)
不为空 判断
|
static NotExists |
notExists(IQuery query)
not exists 一个查询
|
static NotIn |
notIn(Cmd key,
Collection<?> values)
not in 多个值
|
static NotIn |
notIn(Cmd key,
IQuery query)
not in 一个查询
|
static NotIn |
notIn(Cmd key,
Object... values)
not in 多个值
|
static NotLike |
notLike(Cmd key,
Object value)
notLike 判断
|
static NotLike |
notLike(LikeMode mode,
Cmd key,
Object value)
not like 判断
|
static Cmd |
paramWrapAndConvertToCmd(Cmd key,
Object param) |
static Pi |
pi()
pi 返回圆周率 函数
|
static Plus |
plus(Cmd key,
Cmd value)
plus加法
|
static Plus |
plus(Cmd key,
Number value)
plus加法
|
static Pow |
pow(Cmd key,
int n)
pow平方 函数
|
static Radians |
radians(Cmd key)
将角度转换为弧度 函数
|
static Rand |
rand(Cmd key)
rand返回 0~1 的随机数 函数
|
static Rand |
rand(Cmd key,
Number max)
rand返回 0~max 的随机数 函数
|
static Repeat |
repeat(Cmd key,
int n)
将字符串 重复 n 次
|
static Replace |
replace(Cmd key,
String target,
String replacement)
替换 函数
|
static Reverse |
reverse(Cmd key)
反转函数
|
static Right |
right(Cmd key,
int start)
右边截取
|
static Round |
round(Cmd key)
round四舍五入 取整数位 函数
|
static Round |
round(Cmd key,
int precision)
round四舍五入 函数
|
static Rpad |
rpad(Cmd key,
int length,
String pad)
从左边开始填充
|
static Rtrim |
rtrim(Cmd key)
删除右边空格
|
static Sign |
sign(Cmd key)
sign 返回 key 的符号,key 是负数、0、正数分别返回 -1、0、1 函数
|
static Sin |
sin(Cmd key)
求正弦值 函数
|
static Sqrt |
sqrt(Cmd key)
sqrt 平方根 函数
|
static Strcmp |
strcmp(Cmd key,
String str)
字符串比较 函数
返回 -1 0 1
|
static SubStr |
subStr(Cmd key,
int start)
字符截取
|
static SubStr |
subStr(Cmd key,
int start,
int length)
字符截取
|
static Subtract |
subtract(Cmd key,
Cmd value)
subtract减法
|
static Subtract |
subtract(Cmd key,
Number value)
subtract加法
|
static Sum |
sum(Cmd key)
sum求和 函数
|
static Tan |
tan(Cmd key)
求正切值 函数
|
static Trim |
trim(Cmd key)
删除两边空格
|
static Truncate |
truncate(Cmd key)
返回数值 key 整数位 函数
|
static Truncate |
truncate(Cmd key,
int precision)
返回数值 key 保留到小数点后 precision 位的值 函数
|
static Upper |
upper(Cmd key)
转换成大写 函数
|
static BasicValue |
value(Serializable value)
value
|
static Weekday |
weekday(Cmd key)
获取星期几
|
static Year |
year(Cmd key)
获取年份
|
public MysqlFunctions mysql(Cmd key)
public static Object likeParamWrap(Cmd key, Object param, LikeMode mode, boolean isNotLike)
public static BasicValue value(Serializable value)
value - public static Count1 count1()
public static CountAll countAll()
public static Pi pi()
public static Truncate truncate(Cmd key, int precision)
key - precision - public static CharLength charLength(Cmd key)
key - public static SubStr subStr(Cmd key, int start, int length)
key - start - length - public static Replace replace(Cmd key, String target, String replacement)
key - target - 匹配目标replacement - 替换值public static FindInSet mysqlFindInSet(Cmd key, String match)
key - match - public static FindInSet mysqlFindInSet(Cmd key, Number match)
key - match - @SafeVarargs public static Field mysqlFiled(Cmd key, Object... values)
key - values - 数据public static CurrentDate currentDate()
public static CurrentTime currentTime()
public static CurrentDateTime currentDateTime()
public static DateFormat date(Cmd key)
key - public static DateFormat dateFormat(Cmd key, String pattern)
key - pattern - public static DateFormat dateFormat(Cmd key, DatePattern pattern)
key - pattern - @SafeVarargs public static Concat concat(Cmd key, Object... values)
key - values - 数据@SafeVarargs public static ConcatAs concatAs(Cmd key, String split, Object... values)
key - split - values - public static If if_(Condition condition, Serializable value, Serializable thenValue)
condition - value - thenValue - public static If if_(Condition condition, Cmd value, Serializable thenValue)
condition - value - thenValue - public static If if_(Condition condition, Serializable value, Cmd thenValue)
condition - value - thenValue - public static If if_(Condition condition, Cmd value, Cmd thenValue)
condition - value - thenValue - public static IfNull ifNull(Cmd key, Serializable value)
key - value - public static Case case_()
@SafeVarargs public static In in(Cmd key, Object... values)
public static In in(Cmd key, Collection<?> values)
@SafeVarargs public static NotIn notIn(Cmd key, Object... values)
public static NotIn notIn(Cmd key, Collection<?> values)
public static Between between(Cmd key, Serializable value, Serializable value2)
key - value - value2 - public static NotBetween notBetween(Cmd key, Serializable value, Serializable value2)
key - value - value2 - public static NotLike notLike(LikeMode mode, Cmd key, Object value)
key - value - public static FromUnixTime mysqlFromUnixTime(Cmd key)
key - public static JsonContains mysqlJsonContains(Cmd key, Serializable containValue)
key - 列containValue - 包含值public static JsonContains mysqlJsonContains(Cmd key, Serializable containValue, String path)
key - 列containValue - 包含值path - 指定路径@SafeVarargs public static JsonContainsPath mysqlJsonContainsPath(Cmd key, String... paths)
key - 列paths - 指定路径@SafeVarargs public static JsonContainsPath mysqlJsonContainsPath(Cmd key, boolean allMatch, String... paths)
key - 列allMatch - 是否全匹配上paths - 指定路径@SafeVarargs public static JsonExtract mysqlJsonExtract(Cmd key, String... paths)
Copyright © 2024. All rights reserved.