# Package-level declarations

## Types

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

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

CurrentDateTime
Link copied to clipboard
object CurrentDateTime : Function<DateTime>

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

Date
Link copied to clipboard
class Date<T : DateTime?>(val expr: Expression<T>) : Function<DateTime>

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

DateTimeWithTimeZoneColumnType
Link copied to clipboard
class DateTimeWithTimeZoneColumnType : OffsetDateTimeColumnType<DateTime>

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

Day
Link copied to clipboard
class Day<T : DateTime?>(val expr: Expression<T>) : Function<Int>

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

Hour
Link copied to clipboard
class Hour<T : DateTime?>(val expr: Expression<T>) : Function<Int>

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

JodaLocalDateColumnType
Link copied to clipboard
class JodaLocalDateColumnType : LocalDateColumnType<DateTime>
JodaLocalDateTimeColumnType
Link copied to clipboard
class JodaLocalDateTimeColumnType : LocalDateTimeColumnType<DateTime>

Column for storing dates, as DateTime. If time is set to `true`, both date and time data is stored.

JodaLocalTimeColumnType
Link copied to clipboard
class JodaLocalTimeColumnType : LocalTimeColumnType<LocalTime>

Column for storing times, as LocalTime.

Minute
Link copied to clipboard
class Minute<T : DateTime?>(val expr: Expression<T>) : Function<Int>

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

Month
Link copied to clipboard
class Month<T : DateTime?>(val expr: Expression<T>) : Function<Int>

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

Second
Link copied to clipboard
class Second<T : DateTime?>(val expr: Expression<T>) : Function<Int>

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

Time
Link copied to clipboard
class Time<T : DateTime?>(val expr: Expression<T>) : Function<LocalTime>

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

Year
Link copied to clipboard
class Year<T : DateTime?>(val expr: Expression<T>) : Function<Int>

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

## Functions

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

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<DateTime?>

Calls a custom SQL function with the specified functionName, that returns both a date and a time, 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.

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

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
fun <T : DateTime?> Expression<T>.date(): Date<T>

Returns the date from this datetime expression.

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

A date column to store a date.

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

Returns the specified value as a date literal.

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

Returns the specified value as a date query parameter.

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

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

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

Returns the specified value as a date with time literal.

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

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

day
Link copied to clipboard
fun <T : DateTime?> Expression<T>.day(): Day<T>

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

hour
Link copied to clipboard
fun <T : DateTime?> Expression<T>.hour(): Hour<T>

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

minute
Link copied to clipboard
fun <T : DateTime?> Expression<T>.minute(): Minute<T>

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

month
Link copied to clipboard
fun <T : DateTime?> Expression<T>.month(): Month<T>

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

second
Link copied to clipboard
fun <T : DateTime?> Expression<T>.second(): Second<T>

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

time
Link copied to clipboard
fun <T : DateTime?> Expression<T>.time(): Time<T>

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.

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

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

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

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

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

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

year
Link copied to clipboard
fun <T : DateTime?> Expression<T>.year(): Year<T>

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