PgIntervalAsDurationConverter

object PgIntervalAsDurationConverter : ResultConverter<Any, Duration>

interval czytany jako Duration.

Sterownik oddaje interval jako PgInterval - miesiące, dni i czas osobno, bo tyle właśnie trzyma PostgreSQL i tylko tak da się to oddać bez zgadywania długości miesiąca. Report engine (IntervalColumn, IntervalFilter) mówi jednak Duration i tak było w starej bibliotece, więc spłaszczenie zostaje - po regule justify_interval: miesiąc to 30 dni, dzień to 24 godziny.

Properties

Link copied to clipboard
open override val supportedSourceClass: KClass<Any>

Functions

Link copied to clipboard
open override fun canConvert(sourceClass: KClass<*>, expectedType: KType, sourceType: PgType, context: DeserializationContext): Boolean
Link copied to clipboard
open override fun convert(source: Any, expectedType: KType, sourceType: PgType, context: DeserializationContext): Duration