Package com.alibaba.druid.sql.ast.expr
Enum SQLIntervalUnit
- java.lang.Object
-
- java.lang.Enum<SQLIntervalUnit>
-
- com.alibaba.druid.sql.ast.expr.SQLIntervalUnit
-
- All Implemented Interfaces:
Serializable,Comparable<SQLIntervalUnit>
public enum SQLIntervalUnit extends Enum<SQLIntervalUnit>
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanadd(Calendar calendar, int intervalInt, SQLIntervalUnit unit)booleanisDateTime()static SQLIntervalUnitof(String str)static SQLIntervalUnitvalueOf(String name)Returns the enum constant of this type with the specified name.static SQLIntervalUnit[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
YEAR
public static final SQLIntervalUnit YEAR
-
YEAR_MONTH
public static final SQLIntervalUnit YEAR_MONTH
-
QUARTER
public static final SQLIntervalUnit QUARTER
-
MONTH
public static final SQLIntervalUnit MONTH
-
WEEK
public static final SQLIntervalUnit WEEK
-
DAY
public static final SQLIntervalUnit DAY
-
DAY_HOUR
public static final SQLIntervalUnit DAY_HOUR
-
DAY_MINUTE
public static final SQLIntervalUnit DAY_MINUTE
-
DAY_SECOND
public static final SQLIntervalUnit DAY_SECOND
-
DAY_MICROSECOND
public static final SQLIntervalUnit DAY_MICROSECOND
-
HOUR
public static final SQLIntervalUnit HOUR
-
HOUR_MINUTE
public static final SQLIntervalUnit HOUR_MINUTE
-
HOUR_SECOND
public static final SQLIntervalUnit HOUR_SECOND
-
HOUR_MICROSECOND
public static final SQLIntervalUnit HOUR_MICROSECOND
-
MINUTE
public static final SQLIntervalUnit MINUTE
-
MINUTE_SECOND
public static final SQLIntervalUnit MINUTE_SECOND
-
MINUTE_MICROSECOND
public static final SQLIntervalUnit MINUTE_MICROSECOND
-
SECOND
public static final SQLIntervalUnit SECOND
-
SECOND_MICROSECOND
public static final SQLIntervalUnit SECOND_MICROSECOND
-
MICROSECOND
public static final SQLIntervalUnit MICROSECOND
-
MILLISECOND
public static final SQLIntervalUnit MILLISECOND
-
DAY_OF_WEEK
public static final SQLIntervalUnit DAY_OF_WEEK
-
DOW
public static final SQLIntervalUnit DOW
-
DAY_OF_MONTH
public static final SQLIntervalUnit DAY_OF_MONTH
-
DAY_OF_YEAR
public static final SQLIntervalUnit DAY_OF_YEAR
-
YEAR_OF_WEEK
public static final SQLIntervalUnit YEAR_OF_WEEK
-
YOW
public static final SQLIntervalUnit YOW
-
TIMEZONE_HOUR
public static final SQLIntervalUnit TIMEZONE_HOUR
-
TIMEZONE_MINUTE
public static final SQLIntervalUnit TIMEZONE_MINUTE
-
DOY
public static final SQLIntervalUnit DOY
-
YEAR_TO_MONTH
public static final SQLIntervalUnit YEAR_TO_MONTH
-
-
Method Detail
-
values
public static SQLIntervalUnit[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SQLIntervalUnit c : SQLIntervalUnit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SQLIntervalUnit 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 nameNullPointerException- if the argument is null
-
add
public static boolean add(Calendar calendar, int intervalInt, SQLIntervalUnit unit)
-
isDateTime
public boolean isDateTime()
-
of
public static SQLIntervalUnit of(String str)
-
-