Enum DefaultFuncEnum
- All Implemented Interfaces:
BaseFuncEnum,Serializable,Comparable<DefaultFuncEnum>,java.lang.constant.Constable
常用的sql函数枚举 默认实现
可以自己实现接口
BaseFuncEnum 自定义函数
目前支持一个占位符,不支持多个%s
只例举几个通用的,其他函数 first() last() len() ucase() lcase() 等 或者数据库自定义函数请自行扩展
mpj的初衷是只针对简单的连表查询,而非相对复杂的查询,
建议慎用,复杂的查询还是推荐写sql
- Author:
- yulichang
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetSql()获取sql 片段static DefaultFuncEnumReturns the enum constant of this type with the specified name.static DefaultFuncEnum[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
SUM
-
COUNT
-
MAX
-
MIN
-
AVG
-
LEN
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getSql
Description copied from interface:BaseFuncEnum获取sql 片段- Specified by:
getSqlin interfaceBaseFuncEnum
-