# Package-level declarations

## Types

CurrentDate
Link copied to clipboard
object CurrentDate : Function<LocalDate>

Represents an SQL function that returns the current date, as LocalDate.

CurrentDateTime
Link copied to clipboard
object CurrentDateTime : CurrentTimestampBase<LocalDateTime>

Represents an SQL function that returns the current date and time, as LocalDateTime.

CurrentTimestamp
Link copied to clipboard
object CurrentTimestamp : CurrentTimestampBase<Instant>

Represents an SQL function that returns the current date and time, as Instant.

CurrentTimestampBase
Link copied to clipboard
sealed class CurrentTimestampBase<T> : Function<T>

Represents the base SQL function that returns the current date and time, as determined by the specified columnType.

CurrentTimestampWithTimeZone
Link copied to clipboard
object CurrentTimestampWithTimeZone : CurrentTimestampBase<OffsetDateTime>

Represents an SQL function that returns the current date and time with time zone, as OffsetDateTime.

KotlinDurationColumnType
Link copied to clipboard
class KotlinDurationColumnType : ColumnType<Duration>

Column for storing time-based amounts of time, as Duration.

KotlinInstantColumnType
Link copied to clipboard
class KotlinInstantColumnType : ColumnType<Instant> , IDateColumnType

Column for storing dates and times without time zone, as Instant.

KotlinLocalDateColumnType
Link copied to clipboard
class KotlinLocalDateColumnType : ColumnType<LocalDate> , IDateColumnType

Column for storing dates, as LocalDate.

KotlinLocalDateTimeColumnType
Link copied to clipboard
class KotlinLocalDateTimeColumnType : ColumnType<LocalDateTime> , IDateColumnType

Column for storing dates and times without time zone, as LocalDateTime.

KotlinLocalTimeColumnType
Link copied to clipboard
class KotlinLocalTimeColumnType : ColumnType<LocalTime> , IDateColumnType

Column for storing times, as LocalTime.

KotlinOffsetDateTimeColumnType
Link copied to clipboard
class KotlinOffsetDateTimeColumnType : ColumnType<OffsetDateTime> , IDateColumnType

Column for storing dates and times with time zone, as OffsetDateTime.

YearInternal
Link copied to clipboard
class YearInternal(val expr: Expression<*>) : Function<Int>

## Functions

CustomDateFunction
Link copied to clipboard
fun CustomDateFunction(functionName: String, vararg params: Expression<*>): CustomFunction<LocalDate?>

Calls a custom SQL function with the specified functionName, that returns a date only, and passing params as its arguments.

CustomDateTimeFunction
Link copied to clipboard
fun CustomDateTimeFunction(functionName: String, vararg params: Expression<*>): CustomFunction<LocalDateTime?>

Calls a custom SQL function with the specified functionName, that returns both a date and a time, and passing params as its arguments.

CustomDurationFunction
Link copied to clipboard
fun CustomDurationFunction(functionName: String, vararg params: Expression<*>): CustomFunction<Duration?>

Calls a custom SQL function with the specified functionName, that returns a duration, and passing params as its arguments.

CustomTimeFunction
Link copied to clipboard
fun CustomTimeFunction(functionName: String, vararg params: Expression<*>): CustomFunction<LocalTime?>

Calls a custom SQL function with the specified functionName, that returns a time only, and passing params as its arguments.

CustomTimeStampFunction
Link copied to clipboard
fun CustomTimeStampFunction(functionName: String, vararg params: Expression<*>): CustomFunction<Instant?>

Calls a custom SQL function with the specified functionName, that returns a timestamp, and passing params as its arguments.

CustomTimestampWithTimeZoneFunction
Link copied to clipboard
fun CustomTimestampWithTimeZoneFunction(functionName: String, vararg params: Expression<*>): CustomFunction<OffsetDateTime?>

Calls a custom SQL function with the specified functionName, that returns both a date and a time with time zone, and passing params as its arguments.

Date
Link copied to clipboard
@JvmName(name = "OffsetDateTimeDateFunction")
fun <T : OffsetDateTime?> Date(expr: Expression<T>): Function<LocalDate>

Represents an SQL function that extracts the date part from a given timestampWithTimeZone expr.

@JvmName(name = "InstantDateFunction")
fun <T : Instant?> Date(expr: Expression<T>): Function<LocalDate>

Represents an SQL function that extracts the date part from a given timestamp expr.

@JvmName(name = "LocalDateDateFunction")
fun <T : LocalDate?> Date(expr: Expression<T>): Function<LocalDate>

Represents an SQL function that extracts the date part from a given expr.

@JvmName(name = "LocalDateTimeDateFunction")
fun <T : LocalDateTime?> Date(expr: Expression<T>): Function<LocalDate>

Represents an SQL function that extracts the date part from a given datetime expr.

date
Link copied to clipboard
@JvmName(name = "OffsetDateTimeDateExt")
fun <T : OffsetDateTime?> Expression<T>.date(): Function<LocalDate>

Returns the date from this timestampWithTimeZone expression.

@JvmName(name = "InstantDateExt")
fun <T : Instant?> Expression<T>.date(): Function<LocalDate>

Returns the date from this timestamp expression.

@JvmName(name = "LocalDateDateExt")
fun <T : LocalDate?> Expression<T>.date(): Function<LocalDate>

Returns the date from this date expression.

@JvmName(name = "LocalDateTimeDateExt")
fun <T : LocalDateTime?> Expression<T>.date(): Function<LocalDate>

Returns the date from this datetime expression.

fun Table.date(name: String): Column<LocalDate>

A date column to store a date.

dateLiteral
Link copied to clipboard
fun dateLiteral(value: LocalDate): LiteralOp<LocalDate>

Returns the specified value as a date literal.

dateParam
Link copied to clipboard
fun dateParam(value: LocalDate): Expression<LocalDate>

Returns the specified value as a date query parameter.

datetime
Link copied to clipboard
fun Table.datetime(name: String): Column<LocalDateTime>

A datetime column to store both a date and a time without time zone.

dateTimeLiteral
Link copied to clipboard
fun dateTimeLiteral(value: LocalDateTime): LiteralOp<LocalDateTime>

Returns the specified value as a date with time literal.

dateTimeParam
Link copied to clipboard
fun dateTimeParam(value: LocalDateTime): Expression<LocalDateTime>

Returns the specified value as a date with time query parameter.

Day
Link copied to clipboard
@JvmName(name = "OffsetDateTimeDayFunction")
fun <T : OffsetDateTime?> Day(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the day field from a given timestampWithTimeZone expr.

@JvmName(name = "InstantDayFunction")
fun <T : Instant?> Day(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the day field from a given timestamp expr.

@JvmName(name = "LocalDateDayFunction")
fun <T : LocalDate?> Day(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the day field from a given date expr.

@JvmName(name = "LocalDateTimeDayFunction")
fun <T : LocalDateTime?> Day(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the day field from a given datetime expr.

day
Link copied to clipboard
@JvmName(name = "OffsetDateTimeDayExt")
fun <T : OffsetDateTime?> Expression<T>.day(): Function<Int>

Returns the day from this timestampWithTimeZone expression, as an integer between 1 and 31 inclusive.

@JvmName(name = "InstantDayExt")
fun <T : Instant?> Expression<T>.day(): Function<Int>

Returns the day from this timestamp expression, as an integer between 1 and 31 inclusive.

@JvmName(name = "LocalDateDayExt")
fun <T : LocalDate?> Expression<T>.day(): Function<Int>

Returns the day from this date expression, as an integer between 1 and 31 inclusive.

@JvmName(name = "LocalDateTimeDayExt")
fun <T : LocalDateTime?> Expression<T>.day(): Function<Int>

Returns the day from this datetime expression, as an integer between 1 and 31 inclusive.

duration
Link copied to clipboard
fun Table.duration(name: String): Column<Duration>

A date column to store a duration.

durationLiteral
Link copied to clipboard
fun durationLiteral(value: Duration): LiteralOp<Duration>

Returns the specified value as a duration literal.

durationParam
Link copied to clipboard
fun durationParam(value: Duration): Expression<Duration>

Returns the specified value as a duration query parameter.

Hour
Link copied to clipboard
@JvmName(name = "OffsetDateTimeHourFunction")
fun <T : OffsetDateTime?> Hour(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the hour field from a given timestampWithTimeZone expr.

@JvmName(name = "InstantHourFunction")
fun <T : Instant?> Hour(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the hour field from a given timestamp expr.

@JvmName(name = "LocalDateHourFunction")
fun <T : LocalDate?> Hour(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the hour field from a given date expr.

@JvmName(name = "LocalDateTimeHourFunction")
fun <T : LocalDateTime?> Hour(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the hour field from a given datetime expr.

hour
Link copied to clipboard
@JvmName(name = "OffsetDateTimeHourExt")
fun <T : OffsetDateTime?> Expression<T>.hour(): Function<Int>

Returns the hour from this timestampWithTimeZone expression, as an integer between 0 and 23 inclusive.

@JvmName(name = "InstantHourExt")
fun <T : Instant?> Expression<T>.hour(): Function<Int>

Returns the hour from this timestamp expression, as an integer between 0 and 23 inclusive.

@JvmName(name = "LocalDateHourExt")
fun <T : LocalDate?> Expression<T>.hour(): Function<Int>

Returns the hour from this date expression, as an integer between 0 and 23 inclusive.

@JvmName(name = "LocalDateTimeHourExt")
fun <T : LocalDateTime?> Expression<T>.hour(): Function<Int>

Returns the hour from this datetime expression, as an integer between 0 and 23 inclusive.

Minute
Link copied to clipboard
@JvmName(name = "OffsetDateTimeMinuteFunction")
fun <T : OffsetDateTime?> Minute(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the minute field from a given timestampWithTimeZone expr.

@JvmName(name = "InstantMinuteFunction")
fun <T : Instant?> Minute(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the minute field from a given timestamp expr.

@JvmName(name = "LocalDateMinuteFunction")
fun <T : LocalDate?> Minute(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the minute field from a given date expr.

@JvmName(name = "LocalDateTimeMinuteFunction")
fun <T : LocalDateTime?> Minute(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the minute field from a given datetime expr.

minute
Link copied to clipboard
@JvmName(name = "OffsetDateTimeMinuteExt")
fun <T : OffsetDateTime?> Expression<T>.minute(): Function<Int>

Returns the minute from this timestampWithTimeZone expression, as an integer between 0 and 59 inclusive.

@JvmName(name = "InstantMinuteExt")
fun <T : Instant?> Expression<T>.minute(): Function<Int>

Returns the minute from this timestamp expression, as an integer between 0 and 59 inclusive.

@JvmName(name = "LocalDateMinuteExt")
fun <T : LocalDate?> Expression<T>.minute(): Function<Int>

Returns the minute from this date expression, as an integer between 0 and 59 inclusive.

@JvmName(name = "LocalDateTimeMinuteExt")
fun <T : LocalDateTime?> Expression<T>.minute(): Function<Int>

Returns the minute from this datetime expression, as an integer between 0 and 59 inclusive.

Month
Link copied to clipboard
@JvmName(name = "OffsetDateTimeMonthFunction")
fun <T : OffsetDateTime?> Month(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the month field from a given timestampWithTimeZone expr.

@JvmName(name = "InstantMonthFunction")
fun <T : Instant?> Month(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the month field from a given timestamp expr.

@JvmName(name = "LocalDateMonthFunction")
fun <T : LocalDate?> Month(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the month field from a given date expr.

@JvmName(name = "LocalDateTimeMonthFunction")
fun <T : LocalDateTime?> Month(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the month field from a given datetime expr.

month
Link copied to clipboard
@JvmName(name = "OffsetDateTimeMonthExt")
fun <T : OffsetDateTime?> Expression<T>.month(): Function<Int>

Returns the month from this timestampWithTimeZone expression, as an integer between 1 and 12 inclusive.

@JvmName(name = "InstantMonthExt")
fun <T : Instant?> Expression<T>.month(): Function<Int>

Returns the month from this timestamp expression, as an integer between 1 and 12 inclusive.

@JvmName(name = "LocalDateMonthExt")
fun <T : LocalDate?> Expression<T>.month(): Function<Int>

Returns the month from this date expression, as an integer between 1 and 12 inclusive.

@JvmName(name = "LocalDateTimeMonthExt")
fun <T : LocalDateTime?> Expression<T>.month(): Function<Int>

Returns the month from this datetime expression, as an integer between 1 and 12 inclusive.

Second
Link copied to clipboard
@JvmName(name = "OffsetDateTimeSecondFunction")
fun <T : OffsetDateTime?> Second(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the second field from a given timestampWithTimeZone expr.

@JvmName(name = "InstantSecondFunction")
fun <T : Instant?> Second(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the second field from a given timestamp expr.

@JvmName(name = "LocalDateSecondFunction")
fun <T : LocalDate?> Second(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the second field from a given date expr.

@JvmName(name = "LocalDateTimeSecondFunction")
fun <T : LocalDateTime?> Second(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the second field from a given datetime expr.

second
Link copied to clipboard
@JvmName(name = "OffsetDateTimeSecondExt")
fun <T : OffsetDateTime?> Expression<T>.second(): Function<Int>

Returns the second from this timestampWithTimeZone expression, as an integer between 0 and 59 inclusive.

@JvmName(name = "InstantSecondExt")
fun <T : Instant?> Expression<T>.second(): Function<Int>

Returns the second from this timestamp expression, as an integer between 0 and 59 inclusive.

@JvmName(name = "LocalDateSecondExt")
fun <T : LocalDate?> Expression<T>.second(): Function<Int>

Returns the second from this date expression, as an integer between 0 and 59 inclusive.

@JvmName(name = "LocalDateTimeSecondExt")
fun <T : LocalDateTime?> Expression<T>.second(): Function<Int>

Returns the second from this datetime expression, as an integer between 0 and 59 inclusive.

Time
Link copied to clipboard
@JvmName(name = "OffsetDateTimeTimeFunction")
fun <T : OffsetDateTime?> Time(expr: Expression<T>): Function<LocalTime>

Represents an SQL function that extracts the time part from a given timestampWithTimeZone expr.

@JvmName(name = "InstantTimeFunction")
fun <T : Instant?> Time(expr: Expression<T>): Function<LocalTime>

Represents an SQL function that extracts the time part from a given timestamp expr.

@JvmName(name = "LocalDateTimeFunction")
fun <T : LocalDate?> Time(expr: Expression<T>): Function<LocalTime>

Represents an SQL function that extracts the time part from a given date expr.

@JvmName(name = "LocalDateTimeTimeFunction")
fun <T : LocalDateTime?> Time(expr: Expression<T>): Function<LocalTime>

Represents an SQL function that extracts the time part from a given datetime expr.

time
Link copied to clipboard
@JvmName(name = "OffsetDateTimeTimeExt")
fun <T : OffsetDateTime?> Expression<T>.time(): Function<LocalTime>

Returns the time from this timestampWithTimeZone expression.

@JvmName(name = "InstantTimeExt")
fun <T : Instant?> Expression<T>.time(): Function<LocalTime>

Returns the time from this timestamp expression.

@JvmName(name = "LocalDateTimeExt")
fun <T : LocalDate?> Expression<T>.time(): Function<LocalTime>

Returns the time from this date expression.

@JvmName(name = "LocalDateTimeTimeExt")
fun <T : LocalDateTime?> Expression<T>.time(): Function<LocalTime>

Returns the time from this datetime expression.

fun Table.time(name: String): Column<LocalTime>

A time column to store a time.

timeLiteral
Link copied to clipboard
fun timeLiteral(value: LocalTime): LiteralOp<LocalTime>

Returns the specified value as a time literal.

timeParam
Link copied to clipboard
fun timeParam(value: LocalTime): Expression<LocalTime>

Returns the specified value as a time query parameter.

timestamp
Link copied to clipboard
fun Table.timestamp(name: String): Column<Instant>

A timestamp column to store both a date and a time without time zone.

timestampLiteral
Link copied to clipboard
fun timestampLiteral(value: Instant): LiteralOp<Instant>

Returns the specified value as a timestamp literal.

timestampParam
Link copied to clipboard
fun timestampParam(value: Instant): Expression<Instant>

Returns the specified value as a timestamp query parameter.

timestampWithTimeZone
Link copied to clipboard
fun Table.timestampWithTimeZone(name: String): Column<OffsetDateTime>

A timestamp column to store both a date and a time with time zone.

timestampWithTimeZoneLiteral
Link copied to clipboard
fun timestampWithTimeZoneLiteral(value: OffsetDateTime): LiteralOp<OffsetDateTime>

Returns the specified value as a date with time and time zone literal.

timestampWithTimeZoneParam
Link copied to clipboard
fun timestampWithTimeZoneParam(value: OffsetDateTime): Expression<OffsetDateTime>

Returns the specified value as a date with time and time zone query parameter.

Year
Link copied to clipboard
@JvmName(name = "OffsetDateTimeYearFunction")
fun <T : OffsetDateTime?> Year(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the year field from a given timestampWithTimeZone expr.

@JvmName(name = "InstantYearFunction")
fun <T : Instant?> Year(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the year field from a given timestamp expr.

@JvmName(name = "LocalDateYearFunction")
fun <T : LocalDate?> Year(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the year field from a given date expr.

@JvmName(name = "LocalDateTimeYearFunction")
fun <T : LocalDateTime?> Year(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the year field from a given datetime expr.

year
Link copied to clipboard
@JvmName(name = "OffsetDateTimeYearExt")
fun <T : OffsetDateTime?> Expression<T>.year(): Function<Int>

Returns the year from this timestampWithTimeZone expression, as an integer.

@JvmName(name = "InstantYearExt")
fun <T : Instant?> Expression<T>.year(): Function<Int>

Returns the year from this timestamp expression, as an integer.

@JvmName(name = "LocalDateYearExt")
fun <T : LocalDate?> Expression<T>.year(): Function<Int>

Returns the year from this date expression, as an integer.

@JvmName(name = "LocalDateTimeYearExt")
fun <T : LocalDateTime?> Expression<T>.year(): Function<Int>

Returns the year from this datetime expression, as an integer.