Top Description Fields Constructors Methods
org.jooq

public final Enum DatePart

extends Enum<DatePart>
Class Inheritance
Imports
org.jetbrains.annotations.*, java.time.temporal.ChronoField, org.jooq.impl.DSL

A date part can be used with SQL functions such as extract(). It describes a part of a date / datetime value
Author
Lukas Eder

Field Summary

Modifier and TypeField and Description
public static final DatePart
CENTURY

The century.

public static final DatePart
DAY

The day.

public static final DatePart
DAY_OF_WEEK

The day of the week.

public static final DatePart
DAY_OF_YEAR

The day of the year.

public static final DatePart
DECADE

The decade.

public static final DatePart
EPOCH

The epoch in seconds since 1970-01-01.

public static final DatePart
HOUR

The hour.

public static final DatePart
ISO_DAY_OF_WEEK

The ISO day of the week.

private final Keyword
public static final DatePart
MICROSECOND

The microsecond.

public static final DatePart
MILLENNIUM

The millennium.

public static final DatePart
MILLISECOND

The millisecond.

public static final DatePart
MINUTE

The minute.

public static final DatePart
MONTH

The month.

private final Name
public static final DatePart
NANOSECOND

The nanosecond.

public static final DatePart
QUARTER

The quarter.

public static final DatePart
SECOND

The second.

private final String
public static final DatePart
TIMEZONE

The timezone offset in seconds.

public static final DatePart
TIMEZONE_HOUR

The time zone offset's hour part.

public static final DatePart
TIMEZONE_MINUTE

The time zone offset's minute part.

public static final DatePart
WEEK

The week of the year.

public static final DatePart
YEAR

The year.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public final Keyword
public final Name
public final String
public static DatePart
public static DatePart[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CENTURYback to summary
public static final DatePart CENTURY

The century. The year 2000 is in the 20th century, the year 2001 in the 21st.

Annotations
@NotNull
@Support
DAYback to summary
public static final DatePart DAY

The day. Corresponds to ChronoField#DAY_OF_MONTH semantics.

Annotations
@NotNull
@Support
DAY_OF_WEEKback to summary
public static final DatePart DAY_OF_WEEK

The day of the week. 1 = Sunday, 2 = Monday, ..., 7 = Saturday. Corresponds to ChronoField#DAY_OF_WEEK, shifted by one day.

Annotations
@NotNull
@Support:H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE
DAY_OF_YEARback to summary
public static final DatePart DAY_OF_YEAR

The day of the year. Corresponds to ChronoField#DAY_OF_YEAR.

Annotations
@NotNull
@Support:H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE
DECADEback to summary
public static final DatePart DECADE

The decade. The year divided by 10.

Annotations
@NotNull
@Support
EPOCHback to summary
public static final DatePart EPOCH

The epoch in seconds since 1970-01-01.

Annotations
@NotNull
@Support:H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE
HOURback to summary
public static final DatePart HOUR

The hour. Corresponds to ChronoField#HOUR_OF_DAY semantics.

Annotations
@NotNull
@Support
ISO_DAY_OF_WEEKback to summary
public static final DatePart ISO_DAY_OF_WEEK

The ISO day of the week. 1 = Monday, 2 = Tuesday, ..., 7 = Sunday. Corresponds to ChronoField#DAY_OF_WEEK.

Annotations
@NotNull
@Support:H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE
keywordback to summary
private final Keyword keyword
MICROSECONDback to summary
public static final DatePart MICROSECOND

The microsecond.

Annotations
@NotNull
@Support:H2, HSQLDB, MARIADB, MYSQL, POSTGRES
MILLENNIUMback to summary
public static final DatePart MILLENNIUM

The millennium. The year 2000 is in the 2nd millennium, the year 2001 in the 3rd.

Annotations
@NotNull
@Support
MILLISECONDback to summary
public static final DatePart MILLISECOND

The millisecond.

Annotations
@NotNull
@Support:H2, HSQLDB, POSTGRES
MINUTEback to summary
public static final DatePart MINUTE

The minute. Corresponds to ChronoField#MINUTE_OF_HOUR semantics.

Annotations
@NotNull
@Support
MONTHback to summary
public static final DatePart MONTH

The month. Corresponds to ChronoField#MONTH_OF_YEAR semantics.

Annotations
@NotNull
@Support
nameback to summary
private final Name name

Hides java.lang.Enum.name.

NANOSECONDback to summary
public static final DatePart NANOSECOND

The nanosecond.

Annotations
@NotNull
@Support:H2, HSQLDB
QUARTERback to summary
public static final DatePart QUARTER

The quarter. Jan-Mar = 1, Apr-Jun = 2, Jul-Sep = 3, Oct-Dec = 4.

Annotations
@NotNull
@Support
SECONDback to summary
public static final DatePart SECOND

The second. Corresponds to ChronoField#SECOND_OF_MINUTE semantics.

Annotations
@NotNull
@Support
sqlback to summary
private final String sql
TIMEZONEback to summary
public static final DatePart TIMEZONE

The timezone offset in seconds. Corresponds to ChronoField#OFFSET_SECONDS.

Annotations
@NotNull
@Support:H2, HSQLDB, POSTGRES
TIMEZONE_HOURback to summary
public static final DatePart TIMEZONE_HOUR

The time zone offset's hour part.

Annotations
@NotNull
@Support:H2, HSQLDB, POSTGRES
TIMEZONE_MINUTEback to summary
public static final DatePart TIMEZONE_MINUTE

The time zone offset's minute part.

Annotations
@NotNull
@Support:H2, HSQLDB, POSTGRES
WEEKback to summary
public static final DatePart WEEK

The week of the year.

Annotations
@NotNull
@Support:H2, HSQLDB, MARIADB, MYSQL, POSTGRES
YEARback to summary
public static final DatePart YEAR

The year. Corresponds to ChronoField#YEAR semantics.

Annotations
@NotNull
@Support

Constructor Detail

DatePartback to summary
private DatePart(String sql)

Method Detail

toKeywordback to summary
public final Keyword toKeyword()
toNameback to summary
public final Name toName()
toSQLback to summary
public final String toSQL()
valueOfback to summary
public static DatePart valueOf(String name)
valuesback to summary
public static DatePart[] values()