Package org.h2.expression.analysis

# Enum Class WindowFunctionType

java.lang.Object
java.lang.Enum<WindowFunctionType>
org.h2.expression.analysis.WindowFunctionType

All Implemented Interfaces:
  `Serializable`, `Comparable<WindowFunctionType>`, `Constable`

public enum WindowFunctionType extends Enum<WindowFunctionType>
A type of a window function.

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## 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.

## Method Summary

Modifier and Type
Method
Description
`static WindowFunctionType`
`get(String name)`
Returns the type of window function with the specified name, or null.
`String`
`getSQL()`
Returns SQL representation.
`boolean`
`requiresWindowOrdering()`
Returns whether window function of this type requires window ordering clause.
`static WindowFunctionType`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static WindowFunctionType[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### 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 Details

### values

public static WindowFunctionType[] values()
Returns an array containing the constants of this enum class, in the order they are declared.

Returns:
  an array containing the constants of this enum class, in the order they are declared

### valueOf

public static WindowFunctionType valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
  `NullPointerException` - if the argument is null

### get

public static WindowFunctionType get(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 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