julian Day Column
Defines a nullable DOUBLE column to store a Julian Day Number.
This function creates and registers a column that stores date and time values as a Julian Day Number, which is the number of days since noon in Greenwich on November 24, 4714BC. The underlying type is DOUBLE. KQLite handles the conversion between this floating-point representation and the KQLiteJulianDay wrapper class, providing type safety and convenient date/time handling. The column is nullable by default.
Julian Day is useful for historical and astronomical date calculations.
Example:
object AstronomicalEvents : KQLiteTable("astronomical_events") {
// A nullable DOUBLE column for an event's Julian Day
val eventDay = julianDayColumn("event_julian_day")
// A non-null column
val recordedAt = julianDayColumn("recorded_at").notNull()
}
AstronomicalEvents.quickInsert {
it.eventDay.bind(JULIANDAY(1761301829))
it.recordedAt.bind(JULIANDAY(1761301829).auto())
}Return
A KQLiteColumn instance representing the Julian Day column, which can be further chained with constraints like notNull(), default(), etc.
Author
MOHAMMAD AZIM ANSARI
Parameters
The name of the column in the database.