DateColumnType

class DateColumnType(val time: Boolean) : ColumnType<DateTime> , IDateColumnType

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

Samples

import org.jetbrains.exposed.sql.Column
import org.jetbrains.exposed.sql.ColumnType
import org.jetbrains.exposed.sql.IDateColumnType
import org.jetbrains.exposed.sql.Table
import org.jetbrains.exposed.sql.vendors.*
import org.joda.time.DateTime
import org.joda.time.DateTimeZone
import org.joda.time.Instant
import org.joda.time.LocalTime
import org.joda.time.format.DateTimeFormat
import org.joda.time.format.DateTimeFormatter
import org.joda.time.format.ISODateTimeFormat
import java.sql.ResultSet
import java.time.OffsetDateTime
import java.time.ZoneOffset.UTC
import java.time.ZonedDateTime
import java.time.temporal.ChronoField
import java.util.*

fun main() { 
   //sampleStart 
   registerColumn(name, DateColumnType(true)) 
   //sampleEnd
}

Constructors

Link copied to clipboard
constructor(time: Boolean)

Properties

Link copied to clipboard
open override val hasTimePart: Boolean
Link copied to clipboard
open override var nullable: Boolean
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun nonNullValueAsDefaultString(value: DateTime): String
Link copied to clipboard
open override fun nonNullValueToString(value: DateTime): String
Link copied to clipboard
open override fun notNullValueToDB(value: DateTime): Any
Link copied to clipboard
open fun parameterMarker(value: DateTime?): String
Link copied to clipboard
open override fun readObject(rs: ResultSet, index: Int): Any?
Link copied to clipboard
open fun setParameter(stmt: PreparedStatementApi, index: Int, value: Any?)
Link copied to clipboard
open override fun sqlType(): String
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open fun validateValueBeforeUpdate(value: DateTime?)
Link copied to clipboard
open fun valueAsDefaultString(value: DateTime?): String
Link copied to clipboard
open override fun valueFromDB(value: Any): DateTime?
Link copied to clipboard
open fun valueToDB(value: DateTime?): Any?
Link copied to clipboard
open fun valueToString(value: DateTime?): String