Enum DefaultFuncEnum

java.lang.Object
java.lang.Enum<DefaultFuncEnum>
com.github.yulichang.wrapper.enums.DefaultFuncEnum
All Implemented Interfaces:
BaseFuncEnum, Serializable, Comparable<DefaultFuncEnum>, java.lang.constant.Constable

public enum DefaultFuncEnum extends Enum<DefaultFuncEnum> implements BaseFuncEnum
常用的sql函数枚举 默认实现 可以自己实现接口 BaseFuncEnum 自定义函数 目前支持一个占位符,不支持多个%s

只例举几个通用的,其他函数 first() last() len() ucase() lcase() 等 或者数据库自定义函数请自行扩展

mpj的初衷是只针对简单的连表查询,而非相对复杂的查询,

建议慎用,复杂的查询还是推荐写sql

Author:
yulichang
  • Enum Constant Details

  • Method Details

    • values

      public static DefaultFuncEnum[] 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

      public static DefaultFuncEnum valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getSql

      public String getSql()
      Description copied from interface: BaseFuncEnum
      获取sql 片段
      Specified by:
      getSql in interface BaseFuncEnum