Infinity

data object Infinity : PgInterval

Represents a PostgreSQL positive infinity interval.

Functions

Link copied to clipboard
fun PgInterval.toDateTimePeriod(): DateTimePeriod

Converts this PgInterval to a Kotlinx DateTimePeriod.

Link copied to clipboard

Converts by flattening everything to microseconds, assuming (like PostgreSQL justify_interval): 1 month = 30 days, 1 day = 24 hours.

Link copied to clipboard

Converts strictly. The interval cannot have days and months set, because they have variable length in the calendar.