| Modifier and Type | Method and Description |
|---|---|
ColumnArithmetic |
ColumnArithmetic.add(ColumFunction columFunction) |
ColumnArithmetic |
ColumnArithmetic.divide(ColumFunction columFunction) |
ColumnArithmetic |
ColumnArithmetic.multiply(ColumFunction columFunction) |
ColumnArithmetic |
ColumnArithmetic.subtract(ColumFunction columFunction) |
| Modifier and Type | Class and Description |
|---|---|
class |
AllColumn |
class |
Column |
class |
NumberColumn |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractColumFunction |
class |
AnonymousFunction
匿名函数,当明确不需要函数调用时使用,此类存在的目的是为了统一函数调用行为
|
class |
ColumnFunctionDecorator |
| Modifier and Type | Method and Description |
|---|---|
AbstractColumFunction |
AbstractColumFunction.add(ColumFunction columFunction) |
AbstractColumFunction |
AbstractColumFunction.divide(ColumFunction columFunction) |
AbstractColumFunction |
AbstractColumFunction.multiply(ColumFunction columFunction) |
AbstractColumFunction |
AbstractColumFunction.subtract(ColumFunction columFunction) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
JsonFunction
处理 JSON 数据的函数接口。
-- • 查询数据: 从 JSON 列中查询数据
SELECT data->>"$.name" AS name FROM my_table;
-- • JSON_EXTRACT(): 提取 JSON 数据中的值
SELECT JSON_EXTRACT(data, '$.name') AS name FROM my_table;
-- • JSON_UNQUOTE(): 去掉 JSON 值的引号
SELECT JSON_UNQUOTE(JSON_EXTRACT(data, '$.name')) AS name FROM my_table;
-- • JSON_SET(): 更新 JSON 数据中的值
UPDATE my_table SET data = JSON_SET(data, '$.age', 31) WHERE id = 1;
-- • JSON_ARRAY(): 创建 JSON 数组
SELECT JSON_ARRAY(1, 2, 3) AS numbers;
-- • JSON_OBJECT(): 创建 JSON 对象
SELECT JSON_OBJECT('name', 'John', 'age', 30) AS person;
-- • JSON_CONTAINS(): 检查 JSON 数据是否包含某个值
SELECT JSON_CONTAINS(data, '"John"', '$.name') AS contains_name FROM my_table;
-- • JSON_REMOVE(): 从 JSON 数据中移除指定路径的键
UPDATE my_table SET data = JSON_REMOVE(data, '$.age') WHERE id = 1;
-- • JSON_MERGE(): 合并多个 JSON 文档
SELECT JSON_MERGE('{"name": "John"}', '{"age": 30}') AS merged_data;
|
| Modifier and Type | Class and Description |
|---|---|
class |
JsonExtract
提取 JSON 数据中的值
|
class |
JsonUnquote
去掉 JSON 值的引号
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
LogicalFunction
逻辑函数:
• COALESCE(): 返回第一个非空值。
• NULLIF(): 如果两个值相等,则返回 NULL。
• CASE WHEN:身不属于传统意义上的函数,但它在 SQL 查询中扮演着类似于函数的角色
|
| Modifier and Type | Class and Description |
|---|---|
class |
Distinct |
| Modifier and Type | Interface and Description |
|---|---|
interface |
ScalarFunction
标量函数 (Scalar Functions)
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
ConversionFunction
转换函数: CAST()(类型转换)、CONVERT()(转换数据类型)等。
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
DatetimeFunction
• CURRENT_DATE 或 CURDATE(): 返回当前日期。
• CURRENT_TIME 或 CURTIME(): 返回当前时间。
• DATEADD(date, interval, unit): 向日期加上指定的时间间隔。
• DATEDIFF(date1, date2): 返回两个日期之间的天数。
• YEAR(date): 返回日期的年份。
• MONTH(date): 返回日期的月份。
• DAY(date): 返回日期的天数。
• DATE_FORMAT(date, format): 格式化日期为指定的格式。
|
| Modifier and Type | Class and Description |
|---|---|
class |
DateFormat |
class |
Now |
| Modifier and Type | Class and Description |
|---|---|
class |
AsBinary |
class |
AsText |
class |
Contains |
class |
Distance |
class |
DistanceSphere |
class |
Latitude |
class |
Longitude |
class |
SRID |
| Modifier and Type | Interface and Description |
|---|---|
interface |
NumberFunction
• ABS(x): 返回 x 的绝对值。
• CEIL(x) 或 CEILING(x): 向上取整到最接近的整数。
• FLOOR(x): 向下取整到最接近的整数。
• ROUND(x, d): 将 x 四舍五入到 d 位小数。
• POW(x, y) 或 POWER(x, y): 返回 x 的 y 次幂。
• SQRT(x): 返回 x 的平方根。
• EXP(x): 返回 e 的 x 次幂。
• LOG(x): 返回 x 的自然对数。
• LOG10(x): 返回 x 的以 10 为底的对数。
|
| Modifier and Type | Class and Description |
|---|---|
class |
Abs
绝对值
|
class |
Ceiling
向上取整,返回不小于该列的最小整数。
|
class |
Floor
向下取整,返回不大于该列的最大整数。
|
class |
Mod
取模
|
class |
Round
指定小数位,四舍五入
|
class |
Truncate
截断数字到指定小数位,不进行四舍五入。
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
StringFunction
• CONCAT(str1, str2, ...): 连接两个或多个字符串。
• SUBSTRING(str, start, length): 从字符串 str 中提取子串。
• LENGTH(str) 或 LEN(str): 返回字符串的长度。
• TRIM(str): 删除字符串前后的空格。
• REPLACE(str, search, replace): 替换字符串中的子串。
|
| Modifier and Type | Class and Description |
|---|---|
class |
Length |
class |
Md5 |
class |
SubString |
class |
Upper |
| Modifier and Type | Interface and Description |
|---|---|
interface |
WindowsFunction
窗口函数是在 OVER() 子句中定义的函数,用于在查询结果的某个窗口内执行计算。这个窗口可以是整个结果集或结果集的一个分区(子集),
并且窗口函数的结果通常与行的上下文相关,而不是单独的行。
|
| Modifier and Type | Class and Description |
|---|---|
class |
DenseRank |
class |
Rank |
class |
RowNumber |
| Modifier and Type | Method and Description |
|---|---|
Over |
Over.orderBy(ColumFunction columFunction,
SortOrder sortOrder) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
AggregateFunction
聚合函数 (Aggregate Functions)
|
| Modifier and Type | Class and Description |
|---|---|
class |
Avg |
class |
Count |
class |
Max |
class |
Min |
class |
StdDev
计算指定列的标准差。
|
class |
Sum |
class |
Variance
计算指定列的方差。
|
| Modifier and Type | Method and Description |
|---|---|
default C |
Condition.andEqualTo(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.andEqualTo(ColumFunction columFunction,
Object value) |
<T,F> C |
FunctionCondition.andEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
C |
FunctionCondition.andEqualTo(Object value,
ColumFunction columFunction) |
<T,F> C |
FunctionCondition.andFindInSet(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.andFunction(boolean isEffective,
ColumFunction columFunction)
根据条件使用 AND 逻辑连接一个列函数条件。
|
C |
Condition.andFunction(ColumFunction columFunction)
使用 AND 逻辑连接一个列函数条件。
|
default C |
Condition.andGreaterThan(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.andGreaterThan(ColumFunction columFunction,
Object value) |
<T,F> C |
FunctionCondition.andGreaterThan(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.andGreaterThanOrEqualTo(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.andGreaterThanOrEqualTo(ColumFunction columFunction,
Object value) |
<T,F> C |
FunctionCondition.andGreaterThanOrEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.andIn(boolean isEffective,
ColumFunction columFunction,
Iterable<?> values) |
C |
Condition.andIn(ColumFunction columFunction,
Iterable<?> values) |
<T,F> C |
FunctionCondition.andIn(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.andIsNotNull(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.andIsNotNull(ColumFunction columFunction,
Object value) |
default C |
Condition.andIsNull(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.andIsNull(ColumFunction columFunction,
Object value) |
default C |
Condition.andLessThan(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.andLessThan(ColumFunction columFunction,
Object value) |
<T,F> C |
FunctionCondition.andLessThan(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.andLessThanOrEqualTo(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.andLessThanOrEqualTo(ColumFunction columFunction,
Object value) |
<T,F> C |
FunctionCondition.andLessThanOrEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
<T,F> C |
FunctionCondition.andMatches(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.andNotEqualTo(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.andNotEqualTo(ColumFunction columFunction,
Object value) |
<T,F> C |
FunctionCondition.andNotEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.andNotIn(boolean isEffective,
ColumFunction columFunction,
Iterable<?> values) |
C |
Condition.andNotIn(ColumFunction columFunction,
Iterable<?> values) |
<T,F> C |
FunctionCondition.andNotIn(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.orEqualTo(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.orEqualTo(ColumFunction columFunction,
Object value) |
<T,F> C |
FunctionCondition.orEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
C |
FunctionCondition.orEqualTo(Object value,
ColumFunction columFunction) |
<T,F> C |
FunctionCondition.orFindInSet(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.orFunction(boolean isEffective,
ColumFunction columFunction)
根据条件使用 OR 逻辑连接一个列函数条件。
|
C |
Condition.orFunction(ColumFunction columFunction)
使用 OR 逻辑连接一个列函数条件。
|
default C |
Condition.orGreaterThan(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.orGreaterThan(ColumFunction columFunction,
Object value) |
<T,F> C |
FunctionCondition.orGreaterThan(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.orGreaterThanOrEqualTo(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.orGreaterThanOrEqualTo(ColumFunction columFunction,
Object value) |
<T,F> C |
FunctionCondition.orGreaterThanOrEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.orIn(boolean isEffective,
ColumFunction columFunction,
Iterable<?> values) |
C |
Condition.orIn(ColumFunction columFunction,
Iterable<?> values) |
<T,F> C |
FunctionCondition.orIn(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.orIsNotNull(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.orIsNotNull(ColumFunction columFunction,
Object value) |
default C |
Condition.orIsNull(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.orIsNull(ColumFunction columFunction,
Object value) |
default C |
Condition.orLessThan(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.orLessThan(ColumFunction columFunction,
Object value) |
<T,F> C |
FunctionCondition.orLessThan(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.orLessThanOrEqualTo(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.orLessThanOrEqualTo(ColumFunction columFunction,
Object value) |
<T,F> C |
FunctionCondition.orLessThanOrEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
<T,F> C |
FunctionCondition.orMatches(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.orNotEqualTo(boolean isEffective,
ColumFunction columFunction,
Object value) |
C |
Condition.orNotEqualTo(ColumFunction columFunction,
Object value) |
<T,F> C |
FunctionCondition.orNotEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
default C |
Condition.orNotIn(boolean isEffective,
ColumFunction columFunction,
Iterable<?> values) |
C |
Condition.orNotIn(ColumFunction columFunction,
Iterable<?> values) |
<T,F> C |
FunctionCondition.orNotIn(Fn<T,F> fn,
ColumFunction columFunction) |
| Modifier and Type | Method and Description |
|---|---|
GenericWhereCondition |
GenericWhereCondition.andEqualTo(ColumFunction columFunction,
Object value) |
<T,F> GenericWhereCondition |
GenericWhereCondition.andEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.andEqualTo(Object value,
ColumFunction columFunction) |
<T,F> GenericWhereCondition |
MysqlWhereCondition.andFindInSet(Fn<T,F> fn,
ColumFunction columFunction) |
<T,F> GenericWhereCondition |
GenericWhereCondition.andFindInSet(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.andFunction(ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.andGreaterThan(ColumFunction columFunction,
Object value) |
<T,F> GenericWhereCondition |
GenericWhereCondition.andGreaterThan(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.andGreaterThanOrEqualTo(ColumFunction columFunction,
Object value) |
<T,F> GenericWhereCondition |
GenericWhereCondition.andGreaterThanOrEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.andIn(ColumFunction columFunction,
Iterable<?> values) |
<T,F> GenericWhereCondition |
GenericWhereCondition.andIn(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.andIsNotNull(ColumFunction columFunction,
Object value) |
GenericWhereCondition |
GenericWhereCondition.andIsNull(ColumFunction columFunction,
Object value) |
GenericWhereCondition |
GenericWhereCondition.andLessThan(ColumFunction columFunction,
Object value) |
<T,F> GenericWhereCondition |
GenericWhereCondition.andLessThan(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.andLessThanOrEqualTo(ColumFunction columFunction,
Object value) |
<T,F> GenericWhereCondition |
GenericWhereCondition.andLessThanOrEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
<T,F> GenericWhereCondition |
MysqlWhereCondition.andMatches(Fn<T,F> fn,
ColumFunction columFunction) |
<T,F> GenericWhereCondition |
GenericWhereCondition.andMatches(Fn<T,F> fn,
ColumFunction columFunction) |
<T,F> GenericWhereCondition |
OracleWhereCondition.andMatches(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.andNotEqualTo(ColumFunction columFunction,
Object value) |
<T,F> GenericWhereCondition |
GenericWhereCondition.andNotEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.andNotIn(ColumFunction columFunction,
Iterable<?> values) |
<T,F> GenericWhereCondition |
GenericWhereCondition.andNotIn(Fn<T,F> fn,
ColumFunction columFunction) |
<T,F> GenericWhereCondition |
MysqlWhereCondition.matchesFunction(LogicalOperatorType logicalOperatorType,
Fn<T,F> fn,
ColumFunction columFunction) |
<T,F> GenericWhereCondition |
OracleWhereCondition.matchesFunction(LogicalOperatorType logicalOperatorType,
Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.orEqualTo(ColumFunction columFunction,
Object value) |
<T,F> GenericWhereCondition |
GenericWhereCondition.orEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.orEqualTo(Object value,
ColumFunction columFunction) |
<T,F> GenericWhereCondition |
MysqlWhereCondition.orFindInSet(Fn<T,F> fn,
ColumFunction columFunction) |
<T,F> GenericWhereCondition |
GenericWhereCondition.orFindInSet(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.orFunction(ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.orGreaterThan(ColumFunction columFunction,
Object value) |
<T,F> GenericWhereCondition |
GenericWhereCondition.orGreaterThan(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.orGreaterThanOrEqualTo(ColumFunction columFunction,
Object value) |
<T,F> GenericWhereCondition |
GenericWhereCondition.orGreaterThanOrEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.orIn(ColumFunction columFunction,
Iterable<?> values) |
<T,F> GenericWhereCondition |
GenericWhereCondition.orIn(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.orIsNotNull(ColumFunction columFunction,
Object value) |
GenericWhereCondition |
GenericWhereCondition.orIsNull(ColumFunction columFunction,
Object value) |
GenericWhereCondition |
GenericWhereCondition.orLessThan(ColumFunction columFunction,
Object value) |
<T,F> GenericWhereCondition |
GenericWhereCondition.orLessThan(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.orLessThanOrEqualTo(ColumFunction columFunction,
Object value) |
<T,F> GenericWhereCondition |
GenericWhereCondition.orLessThanOrEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
<T,F> GenericWhereCondition |
MysqlWhereCondition.orMatches(Fn<T,F> fn,
ColumFunction columFunction) |
<T,F> GenericWhereCondition |
GenericWhereCondition.orMatches(Fn<T,F> fn,
ColumFunction columFunction) |
<T,F> GenericWhereCondition |
OracleWhereCondition.orMatches(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.orNotEqualTo(ColumFunction columFunction,
Object value) |
<T,F> GenericWhereCondition |
GenericWhereCondition.orNotEqualTo(Fn<T,F> fn,
ColumFunction columFunction) |
GenericWhereCondition |
GenericWhereCondition.orNotIn(ColumFunction columFunction,
Iterable<?> values) |
<T,F> GenericWhereCondition |
GenericWhereCondition.orNotIn(Fn<T,F> fn,
ColumFunction columFunction) |
| Modifier and Type | Method and Description |
|---|---|
TableRelation<R> |
TableRelation.groupBy(boolean isEffective,
ColumFunction... columFunction) |
TableRelation<R> |
TableRelation.groupBy(ColumFunction... columFunction) |
| Modifier and Type | Method and Description |
|---|---|
ColumFunction |
FunctionColumn.getColumFunction() |
| Constructor and Description |
|---|
FunctionColumn(ColumFunction columFunction,
Consumer<Over> over,
String alias) |
| Modifier and Type | Method and Description |
|---|---|
ColumFunction |
DefaultOrderBy.getColumFunction() |
| Constructor and Description |
|---|
DefaultOrderBy(ColumFunction columFunction,
SortOrder sortOrder) |
| Modifier and Type | Method and Description |
|---|---|
ColumFunction |
Arithmetic.getColumFunctionArithmetic() |
| Modifier and Type | Method and Description |
|---|---|
void |
Arithmetic.setColumFunctionArithmetic(ColumFunction columFunctionArithmetic) |
Copyright © 2024–2025 Dynamic-SQL. All rights reserved.