Package org.h2.expression.analysis
Enum WindowFunctionType
- java.lang.Object
-
- java.lang.Enum<WindowFunctionType>
-
- org.h2.expression.analysis.WindowFunctionType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<WindowFunctionType>
public enum WindowFunctionType extends java.lang.Enum<WindowFunctionType>
A type of a window function.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CUME_DIST
The type for CUME_DIST() window function.DENSE_RANK
The type for DENSE_RANK() window function.FIRST_VALUE
The type for FIRST_VALUE() window function.LAG
The type for LAG() window function.LAST_VALUE
The type for LAST_VALUE() window function.LEAD
The type for LEAD() window function.NTH_VALUE
The type for NTH_VALUE() window function.NTILE
The type for NTILE() window function.PERCENT_RANK
The type for PERCENT_RANK() window function.RANK
The type for RANK() window function.RATIO_TO_REPORT
The type for RATIO_TO_REPORT() window function.ROW_NUMBER
The type for ROW_NUMBER() window function.
-
Constructor Summary
Constructors Modifier Constructor Description private
WindowFunctionType()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WindowFunctionType
get(java.lang.String name)
Returns the type of window function with the specified name, or null.java.lang.String
getSQL()
Returns SQL representation.boolean
requiresWindowOrdering()
Returns whether window function of this type requires window ordering clause.static WindowFunctionType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static WindowFunctionType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ROW_NUMBER
public static final WindowFunctionType ROW_NUMBER
The type for ROW_NUMBER() window function.
-
RANK
public static final WindowFunctionType RANK
The type for RANK() window function.
-
DENSE_RANK
public static final WindowFunctionType DENSE_RANK
The type for DENSE_RANK() window function.
-
PERCENT_RANK
public static final WindowFunctionType PERCENT_RANK
The type for PERCENT_RANK() window function.
-
CUME_DIST
public static final WindowFunctionType CUME_DIST
The type for CUME_DIST() window function.
-
NTILE
public static final WindowFunctionType NTILE
The type for NTILE() window function.
-
LEAD
public static final WindowFunctionType LEAD
The type for LEAD() window function.
-
LAG
public static final WindowFunctionType LAG
The type for LAG() window function.
-
FIRST_VALUE
public static final WindowFunctionType FIRST_VALUE
The type for FIRST_VALUE() window function.
-
LAST_VALUE
public static final WindowFunctionType LAST_VALUE
The type for LAST_VALUE() window function.
-
NTH_VALUE
public static final WindowFunctionType NTH_VALUE
The type for NTH_VALUE() window function.
-
RATIO_TO_REPORT
public static final WindowFunctionType RATIO_TO_REPORT
The type for RATIO_TO_REPORT() window function.
-
-
Method Detail
-
values
public static WindowFunctionType[] 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 (WindowFunctionType c : WindowFunctionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WindowFunctionType valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
get
public static WindowFunctionType get(java.lang.String name)
Returns the type of window function with the specified name, or null.- Parameters:
name
- name of a window function- Returns:
- the type of window function, or null.
-
getSQL
public java.lang.String getSQL()
Returns SQL representation.- Returns:
- SQL representation.
- See Also:
Expression.getSQL(int)
-
requiresWindowOrdering
public boolean requiresWindowOrdering()
Returns whether window function of this type requires window ordering clause.- Returns:
true
if it does,false
if it may be omitted
-
-